Get started with jquery-bootpag CDN

MIT licensed

JQuery BootPag is a lightweight and customizable bootstrap pagination plugin for jQuery.

Tags:
  • pagination
  • bootstrap
  • jquery-plugin
  • ecosystem:jquery

Stable version

Copied!

How to start using jquery-bootpag CDN


$(document).ready(function() {
  // Assuming you have a table with id 'myTable' and 10 rows
  $('#myTable').bootpag({
    total: 10, // Total number of records
    page: 1, // Current page number
    maxVisible: 3, // Maximum number of visible pages
    leaps: true, // Enable fast forward and rewind
    firstLast: false, // Hide first and last page buttons
    nextClass: 'next', // Customize next page button class
    prevClass: 'prev', // Customize previous page button class
    lastClass: 'last', // Customize last page button class
    nextText: 'Next', // Customize next page text
    prevText: 'Prev', // Customize previous page text
    firstText: 'First', // Customize first page text
    lastText: 'Last', // Customize last page text
    onPage: function(page, type) {
      // Handle page change event
      if (type === 'init') {
        // Initialize something on first load
      } else if (type === 'page') {
        // Handle page change event
        $('#myTable').bootstrapTable('refresh', {page: page});
      }
    }
  });
});
Copied!
Copied!

All versions