Simple pagination plugin based on Bootstrap 3

Last updated: 2021-01-21 10:23:49
I couldn't find a suitable pagination library. Some had too many unnecessary features, while others lacked the functionality I needed. So I decided to write one specifically for my own use.
Usage:
This style uses Bootstrap 3 (because I was too lazy to write new styles. You can create your own if needed), so you need to include it first:
Bootstrap 3:
1 |
jQuery:
1 |
Then include this plugin:
1 | <script src="Pagination.js"></script> |
html:
1 2 3 | <div class="container"> <div class="myPagination"></div></div> |
Related parameters:
page: Current page number
int count: Total number of items
int limit: Number of items displayed per page
int groups: Number of page number buttons to display
int prev: Custom HTML code for the Previous button
string next: Custom HTML code for the Next button
string first: Custom HTML code for the First Page button
string last: Custom HTML code for the Last Page button