Javascript utility to enhance the use of Bootstrap's pagination as explained in this article.
-
Download the source file: bootstrap-advanced-pagination.js
-
Add it to the page you want to insert the widget, below Bootstrap sources:
<script type="text/javascript" src="path/to/bootstrap-advanced-pagination.js"></script>
-
Create the object
let apb = new BootstrapAdvancedPagination()
-
Set the Bootstrap version you are using
apb.setBootstrapVersion("4.0.0")
-
Call the method to print the pagination widget:
apb.printWidget(selector, count, page, range)
For example:
apb.printWidget('#pagination', 50, 15, 3)