Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated README

  • Loading branch information...
commit 9e26d39aab3b39210b21ebcafabbec567159f989 1 parent a23c51f
@fredwu fredwu authored
Showing with 10 additions and 10 deletions.
  1. +10 −10 README.md
View
20 README.md
@@ -2,19 +2,19 @@
If you don't already know, [endless scroll](http://www.google.com/search?q=endless+scroll) (or infinite scrolling) is a popular technique among web 2.0 sites such as [Google Reader](http://reader.google.com/) and [Live Image Search](http://www.live.com/?scope=images), 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.
+## Configuration
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) - the HTML to be displayed during loading
-- _data_ (string|function) - plain HTML data, can be either a string or a function that returns a string, when passed as a function it accepts one argument: fire sequence (the number of times the event triggered during the current page session)
-- _insertAfter_ (string) - jQuery selector syntax: where to put the loader as well as the plain HTML data
-- _callback_ (function) - callback function, accepts 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
-- _ceaseFire_ (function) - stops the event (no more endless scrolling) if the function returns true
+- _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) the HTML to be displayed during loading
+- _data_ (string|function) plain HTML data, can be either a string or a function that returns a string, when passed as a function it accepts one argument: fire sequence (the number of times the event triggered during the current page session)
+- _insertAfter_ (string) jQuery selector syntax: where to put the loader as well as the plain HTML data
+- _callback_ (function) callback function, accepts 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
+- _ceaseFire_ (function) stops the event (no more endless scrolling) if the function returns true
In a typical scenario, you won't be using the `data` option, but rather the `callback` option. You may use it to trigger an AJAX call and updates/inserts your page content.
Please sign in to comment.
Something went wrong with that request. Please try again.