Posts Tagged ‘endless’
Latest release: v1.4.1
If you don’t already know, endless scroll (or infinite scrolling) is a popular technique among web 2.0 sites such as Google Reader and Live Image Search, where instead of paging through items using the traditional pagination technique, the page just keeps loading with new items attached to the end.
I have developed a jQuery plugin to easily achieve this.
Requirement: jQuery 1.2+
The plugin is tested with jQuery 1.2.6, 1.3 and 1.4.
There are a few options to customise the behaviour of this plugin:
- bottomPixels (integer) – the number of pixels from the bottom of the page that triggers the event
- fireOnce (boolean) – only fire once until the execution of the current event is completed
- fireDelay (integer) – delay the subsequent firing, in milliseconds. 0 or false to disable delay.
- loader (string) – HTML loader
- data (string) – plain HTML data
- insertAfter (string) – jQuery selector syntax: where to put the loader as well as the plain HTML data
- callback (function) – callback function, accepets one argument: fire sequence (the number of times the event triggered during the current page session)
- resetCounter (function) – resets the fire sequence counter if the function returns true, this function could also perform hook actions since it is applied at the start of the event