Basic Infinite Scroll Plugin with jQuery - iscroll
| File Size: | 12.9 KB |
|---|---|
| Views Total: | 3953 |
| Last Update: | |
| Publish Date: | |
| Official Website: | Go to website |
| License: | MIT |
iscroll is a small and simple jQuery plugin that implements infinite scroll capabilities on any container elements.
Features:
- Auto load more content from an external data file as you reach the bottom of the list & web page.
- Custom loading text and offset.
- Auto disable infinite scroll after X auto loading.
- Callback functions.
- Cross browser.
How to use it:
1. Load jQuery library and the jQuery iscroll plugin in the document.
<script src="jquery.min.js"></script> <script src="jquery.iscroll.js"></script>
2. Add a load more link at the bottom of your list or body content.
<div class="demo> ... <a class="_next" href="data.html" >Load More</a> </div>
3. Call the function on the top element to enable the infinite scroll plugin.
$('.demo').iscroll();
4. Customize the infinite scroll behaviors.
$('.demo').iscroll({
Loadingoffset: 20,
optionsData: {},
loadingHtml: '<small>Loading...</small>', // null
sendReqonInit:false,
autoTrigger: true, //must be true for autoTriggerUntil
autoTriggerUntil: false,
next:'a:last',
onBeginRequest: null,
ondataArrival: null
});
This awesome jQuery plugin is developed by HemantNegi. For more Advanced Usages, please check the demo page or visit the official website.











