A lightweight implementation of the infinite scroll mechanic. By providing two essential callbacks, loadMore
and doneLoading
, the jQuery Infinite Scroll Helper plugin makes it a breeze to add infinite scrolling functionality to your page.
(integer) The number of pixels from the bottom of the window in which the loadMore
function should be invoked. The default is 0.
(function) A callback function that must return true
or false
, depending on whether loading has completed. This callback is passed a pageCount
argument.
(integer) The interval, in milliseconds, that the doneLoading callback will be called by the plugin. The default is 300.
(function) A callback function that is invoked when the scrollbar eclipses the bottom threshold of the element. This callback is passed a pageCount
argument which can be helpful
when making requests to endpoints that accept a page parameter.
(string) The class name that will be applied to the element when loadMore
is called. It is removed once doneLoading
returns true
. The default is loading
.
Destroys the plugin instance, removing all internal listeners and nullifying any external references.
$(selector).infiniteScrollHelper('destroy');
$('#my-element-to-watch').infiniteScrollHelper({
loadMore: function(page) {
// load some data, parse some data
},
doneLoading: function() {
// return true if you are done doing your thing, false otherwise
return false;
}
});
- jQuery 1.7.0+
- Changing details in manifest file
- Doc updates
- Fixed manifest file keyword error
- Regenerated minified/production script to match development version
- Initial Release