lorenzovngl / bootstrap-advanced-pagination

Javascript utility to enhance the use of Bootstrap's pagination.

Home Page:https://www.lorenzovainigli.com/en/2019/08/advanced-pagination-with-bootstrap/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Advanced pagination with Bootstrap

GitHub release (latest by date)

Javascript utility to enhance the use of Bootstrap's pagination as explained in this article.

Advanced pagination with Bootstrap

Usage

  1. Download the source file: bootstrap-advanced-pagination.js

  2. 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>
  3. Create the object

    let apb = new BootstrapAdvancedPagination()
  4. Set the Bootstrap version you are using

    apb.setBootstrapVersion("4.0.0")
  5. Call the method to print the pagination widget:

    apb.printWidget(selector, count, page, range)

    For example:

    apb.printWidget('#pagination', 50, 15, 3)

About

Javascript utility to enhance the use of Bootstrap's pagination.

https://www.lorenzovainigli.com/en/2019/08/advanced-pagination-with-bootstrap/

License:MIT License