Download
Demo
- Overview
- Documents
User Rating: 0/5 ( 0 votes)
Your Rating:
Pager is a jQuery plugin for simple pagination.
Source: formstone.it
1. INCLUDE JS AND CSS FILES
<script src="jquery.fs.pager.js"></script> <script src="jquery.js"></script> <link href="jquery.fs.pager.css" rel="stylesheet">
2. HTML
<div class="pagination"> <a href="#1">1</a> <a href="#2">2</a> <a href="#3">3</a> ... </div>
3. JAVASCRIPT
$(".target").pager();
4. OPTIONS
Options are set by passing a valid options object at initialization or to the public "defaults" method. You can also set custom options for a specific instance by attaching a data-boxer-options attribute containing a properly formatted JSON object to the target element.
NAME | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
ajax | boolean | false | Flag to disable default click actions |
labels.close | string | 'Close' | Close button text |
labels.count | string | 'of' | Gallery count separator text |
labels.next | string | 'Next' | Gallery control text |
labels.previous | string | 'Previous' | Gallery control text |
maxWidth | string | '980px' | Width at which to auto-disable plugin |
visible | int | 2 | Visible pages before and after current page |
5. METHODS
Methods are publicly available to all active instances, unless otherwise stated.
defaults
Sets default plugin options
$.pager("defaults", opts);
PARAMETER | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
opts | object | {} | Options object |
destroy
Removes instance of plugin
$(".target").pager("destroy");
jump
Jump instance of plugin to specific page
$(".target").pager("jump", 1);
6. EVENTS
Events are triggered on the target instance's element, unless otherwise stated.
OPTION | DESCRIPTION |
---|---|
update.pager | Current page updated |