Simplex Design blog : Infinite scrolling or load more effect for Blogger - part 2 |
Infinite scrolling or load more effect for Blogger - part 2 Posted: 24 Feb 2013 10:22 AM PST As introduced in last post on Jquery Ajax Scrolling plugin, the basic usage and how to apply it to default Blogger templates, this post, I will go further on the way to apply this technique to all custom Blogger template Live Demo Because it too long, so I divide this post into 3 parts with detail as bellow: - Part 1: Basic usage of Jquery Ajax Scrolling and apply it to default Blogger template - Part 2: How to apply Infinite Scrolling technique to all Blogger templates. - Part 3: Combine this Jquery plugin with other plugin ( layout plugins such as Masonry, Isotape, or Disqus comment system, Google Analytics) Part 2: How to apply Infinite Scrolling technique to all Blogger templates.To install Ajax Scrolling plugin to a custom Blogger template, I recommend you read the part 1 first which I explain everything clearly.Install instruction1, Open your template file.2, Search for <b:includable id='post' var='post'> , it will show you the "post" includable in "Blog post" widget. (For more information on what includable, what widget is, you can take a look at this post) You will get something like this <b:includable id='post' var='post'>Now just add HTML into these tags to make it look like this: <b:includable id='post' var='post'>3, Now we search for <b:includable id='main' var='top'>, it will show you the "main" includable in "Blog post" widget. Something like this : <b:includable id='main' var='top'>Now, add HTML to make these tags above look like this: <b:includable id='main' var='top'>Ok done. 4, Now search for <b:includable id='nextprev'> , it will show you the "nextprev" includablein Blog post widget. <b:includable id='nextprev'>Add HTML tag to make code above look like this: <b:includable id='nextprev'>In the code "nextprev" includable above, find this HTML element : <a expr:href='data:olderPageUrl'> ............ </a> , this element can contain other things inside, but don't need to care about them, if you see expr:href='data:olderPageUrl' , it means you find the correct one. Wrap <a expr:href='data:olderPageUrl'> ............ </a> by HTML tags like this: <div id="ias_page_next"><a expr:href='data:olderPageUrl'> ............ </a></div> 5, After finish steps above, you can install Ajax Scrolling plugin as normal by adding this code right before </head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>Save template and see the result. How it workUntil now, do you have the picture of what we are doing? Yes, in part 1 of this series for default Blogger template, I explained elements of Ajax Scrolling script with detail on "container", "item", "pagination", "next", "loader" in script.In a custom Blogger templates, there's no "container", "item", "pagination", "next" element for you, so we add HTML elements and then assign this to Ajax scrolling script. That's all for this post. I will post the next one at the soonest on the way to combination Ajax Scrolling plugin with Disqus, Masonry ... |
You are subscribed to email updates from SimplexDesign - free premium blogspot template To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |