Extra light plug-in for Bootstrap's nav component. Made to improve users experience when dealing with high-sized navigation.
- Bootstrap 3.3 or higher
You can download the plug-in here, or include the file from the CDN.
Which file to include ?
Bootstrap ☞ bootstrap-nav-paginator.js or bootstrap-nav-paginator.min.js
Bootstrap + JQuery ☞ bootstrap-nav-paginator.jquery.js or bootstrap-nav-paginator.jquery.min.js
Add the class nav-paginator to your nav component.
Be sure to also specify the number of items per page data-paginator-item-count and optionally, the class given to navigation's buttons data-paginator-buttons-class.
<ul class="nav nav-pills nav-fill nav-paginator" data-paginator-item-count="5" data-paginator-buttons-class="nav-link">
...
</ul>
<script>
//Init with 5 items per page & the class "nav-link" for navigation's buttons
document.querySelector("#nav-tabs").BsNavPaginator(5, "nav-link");
</script>
<script>
//Init with 5 items per page & the class "nav-link" for navigation's buttons
$("#nav-tabs").BsNavPaginator(5, "nav-link");
</script>
You can check for examples here.
Bootstrap Nav Paginator is released under the MIT license. You are free to use, modify and distribute this software, as long as the copyright header is left intact (specifically the comment block which starts with /*!).
