Search This Blog

Wednesday, November 10, 2010

Endless Scroll



We generally have lots of content to present but can not load all of it at once as it may take too long.so we add pagination in the page where the user has to click to get more content.Check the new approach below.


What is Endless scroll?



When we are scrolling down a webpage, the code recognizes that you are at the bottom and auto-loads new content or the next page .

Why to use it?

It helps increasing the initial load speeds of pages faster and users will have to load only the content they see.)
How it works 
When "if  ($(window).scrollTop() == $(document).height() - $(window).height())" then load the next page using jQuery 

Disadvantages 


when a users put the scroll at the end and hold it then there will be a lot ajax request will be sent to the server to avoid this we can have some delay before sending a request 


Implementations 


http://plugins.jquery.com/project/endless-scroll


Examples
Check out your twitter pages (http://twitter.com) :)