simplePagination.js
A simple jQuery pagination plugin, 3 CSS themes and Bootstrap support.
CSS Themes
"light-theme"
"dark-theme"
"compact-theme"
Download
Get the zip containing the plugin and the CSS themes here.
How To Use
Step 1: together with JQuery, include jquery.simplePagination.js in your page:
<script type="text/javascript" src="path_to/jquery.js"></script>
<script type="text/javascript" src="path_to/jquery.simplePagination.js"></script>
JQuery 1.7.2 or later is recommended. Older versions might work as well, but they are not tested.
Step 2: OPTIONAL - include the CSS file with the 3 default themes
<link type="text/css" rel="stylesheet" href="path_to/simplePagination.css"/>
If you skip this step, you will need to define your own styles or use Bootstrap.
Step 3: call the function on your pagination placeholder:
$(function() {
$(selector).pagination({
items: 100,
itemsOnPage: 10,
cssStyle: 'light-theme'
});
});
If necessary, you can specify the number of pages directly, via "pages" parameter, instead of "items" and "itemsOnPage" which are used by the plugin to automatically calculate the number of pages.