Simple Convenient Pagination Plugin For jQuery - Paginathing

File Size: 4.95 KB
Views Total: 4314
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Simple Convenient Pagination Plugin For jQuery - Paginathing

Paginathing is a simple yet highly configurable jQuery pagination plugin used to paginate any group of HTML elements (e.g. large tables and lists) on your webpage. Fully compatible with Bootstrap pagination component.

Key features:

  • Allows to limit the maximum of pages.
  • Allows to specify how many items to be displayed per page.
  • Custom pagination buttons.
  • Easy to style using your own CSS.

How to use it:

1. To use this plugin, you have to include the jQuery paginathing plugin after you have jQuery library included.

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="paginathing.js"></script>

2. Just call the function paginathing on target element and done.

$('table tbody').paginathing({
  // options here
});

3. Possible options to customize the pagination plugin.

$('table tbody').paginathing({

  // how many items per page
  perPage: 10, // show item per page

  // // false or number
  limitPagination: false, 

  // enable next / prev buttons
  prevNext: true,

  // enable first / last buttons
  firstLast: true, 

  // custom text for pagination buttons
  prevText: '&laquo;', 
  nextText: '&raquo;', 
  firstText: 'First', 
  lastText: 'Last', 

  // default container class
  containerClass: 'pagination-container', 

  // default ul class
  ulClass: 'pagination', // extend default ul class

  // li class
  liClass: 'page', 

  // active class
  activeClass: 'active',

  // disabled class
  disabledClass: 'disable' 

  // class or id (eg: .element or #element). 
  // append the paginator after certain element
  insertAfter: null 
  
});

This awesome jQuery plugin is developed by alfredcrosby. For more Advanced Usages, please check the demo page or visit the official website.