A jQuery plugin. As you scroll down you see more results coming back at you automatically.
Switch branches/tags
Nothing to show
Pull request Compare This branch is 65 commits behind jney:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
lib
.gitignore
README.textile

README.textile

PageLess – endless page

Description

A jQuery plugin.
As you scroll down you see more results coming back at you automatically.

Parameters

  • currentPage: current page (params[:page])
  • distance: distance to the end of page in px when ajax query is fired
  • loader: selector of the loader div (ajax activity indicator)
  • loaderHtml: html code of the div if loader not used
  • loaderImage: image inside the loader
  • loaderMsg: displayed ajax message
  • pagination: selector of the paginator divs. (if javascript is disabled paginator is required)
  • params: paramaters for the ajax query, you can pass auth_token here
  • totalPages: total number of pages
  • url: URL used to request more data
  • scrape: A function to modify the incoming data. (Doesn’t do anything by default)
  • complete: A function to call when a new page has been loaded (optional)
  • afterStopListener: A function to call when the last page has been loaded (optional)

Requirements

  • jQuery
  • will_paginate (optional but usefull when it comes to pagination)
    $ gem install will_paginate

Demo

In the example directory you’ll find a Rails app that just runs. It demonstrates the basic usage of pageless scrolling.

$ script/server

Then just navigate to http://localhost:3000 and enjoy!

TODO

Make it work with a div scroll.

Who uses it

Thanks to

Contributors

  • Jean-Sébastien Ney (jney)
  • Alexander Lang (langalex)
  • Lukas Rieder (Overbryd)