Download
User Rating: 4.1/5 ( 7 votes)
jScroll is a jQuery plugin for infinite scrolling. Infinite scrolling; also known as lazy loading, endless scrolling, autopager, endless pages, etc.; is the ability to load content via AJAX within the current page or content area as you scroll down. The new content can be loaded automatically each time you scroll to the end of the existing content, or it can be triggered to load by clicking a navigation link at the end of the existing content.
An example of infinite scrolling is your Facebook "News Feed" page. You may notice that when you scroll to the bottom of this page, new content will often load automatically, or you will be given a link to "Older Posts" which will load more content when clicked.
Source: jscroll.com
1. INCLUDE CSS AND JS FILES
<link rel="stylesheet" type="text/css" href="/jscroll.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="/jquery.jscroll.min.js"></script>
2. HTML
<div class="scroll">
<h3>Page 1</h3>
<p>Content here...</p>
<a href="example-page2.html">next page</a>
</div>
3. JAVASCRIPT
$('.scroll').jscroll();
4. OPTIONS
The jscroll method takes an optional object literal as a parameter for overriding the default options. An example of how this can be done is shown below.
$('.infinite-scroll').jscroll({
loadingHtml: '<img src="loading.gif" alt="Loading" /> Loading...',
padding: 20,
nextSelector: 'a.jscroll-next:last',
contentSelector: 'li'
});
Options