Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sethetter/pages.js
The tiny javascript paginator.
https://github.com/sethetter/pages.js
Last synced: 12 days ago
JSON representation
The tiny javascript paginator.
- Host: GitHub
- URL: https://github.com/sethetter/pages.js
- Owner: sethetter
- Created: 2013-03-14T13:24:21.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-03-28T04:15:45.000Z (over 11 years ago)
- Last Synced: 2024-04-14T15:20:21.831Z (7 months ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pages.js - The Tiny Javascript Paginator
This is the tiniest Javascript paginator (that I've seen at least) for paginating a large collection of items on a page.
## How to Use
Include ```pages.js``` in your page and initialize a new Paginator:
var paginator = new Paginator({
per_page: 5
item_class: ".post",
prev_id: "#previous_page",
next_id: "#next_page",
page_jump_container: "#page_jump"
page_jump_separator: " | ";
});The above demonstrates all available options.
- ```per_page``` - number of items to display per page.
- ```item_class``` - the class of items you wish to paginate.
- ```prev``` and ```next``` - ID's for the previous and next page links.
- ```page_jump_container``` - an ID for the container holding the page jump links.
- ```page_jump_separator``` - string used to separate page jump links.## Todos
- Remove jQuery dependency
- Create example page
- Create some tests