Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jney/jquery.pageless
A jQuery plugin. As you scroll down you see more results coming back at you automatically.
https://github.com/jney/jquery.pageless
Last synced: 11 days ago
JSON representation
A jQuery plugin. As you scroll down you see more results coming back at you automatically.
- Host: GitHub
- URL: https://github.com/jney/jquery.pageless
- Owner: jney
- Archived: true
- Created: 2008-06-07T23:32:28.000Z (over 16 years ago)
- Default Branch: master
- Last Pushed: 2014-05-01T18:24:49.000Z (over 10 years ago)
- Last Synced: 2024-08-02T14:10:40.722Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 385 KB
- Stars: 270
- Watchers: 12
- Forks: 52
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PageLess - endless page
=======================Description
-----------Pageless is a jQuery plugin.
As you scroll down you see more results coming back at you automatically.
It provides an automatic pagination in an accessible way : if javascript is disabled your standard pagination is supposed to work.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
* `method`: HTML method for call URL, default - get
* `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)
* `end`: A function to call when the last page has been loaded (optional)Requirements
------------* [jQuery](http://download.jquery.com)
Then just navigate to http://localhost:3000 and enjoy!
Demo (Rails 3)
----[Demo](https://github.com/jney/jquery.pageless.demo) is a Rails 3 app that just runs. It demonstrates the basic usage of pageless scrolling.
$ bundle install
$ rails sThen just navigate to http://localhost:3000 and enjoy!
Usage
-----$('#results').pageless({ totalPages: 10
, url: '/articles/'
, loaderMsg: 'Loading more results'
});Thanks to
---------* http://codemonky.com/post/34940898
* http://www.unspace.ca/discover/pageless/
* http://famspam.com/faceboxContributors
------------* [Jean-Sébastien Ney](https://github.com/jney)
* [Alexander Lang](https://github.com/langalex)
* [Lukas Rieder](https://github.com/Overbryd)