
A simple, self-contained, modular controller for managing paginated links.
Perfect complement to any AJAX-powered component that displays results in sets.
bower install basic-pagination
npm install basic-pagination
Usage
let pager = new Pagination(el, {
active: 2,
onChange: function(newIndex, oldIndex){
console.log(`Current page is now ${newIndex}`);
},
linkTemplate: '<li><a href="#">Custom element, you say?</a></li>'
});
pager.active = 10;
Full option documentation can be found here.
License
Oh, I am so not fussed. This is released under the ISC license,
which is basically just a simplified version of the MIT license.
Author attribution is nice, but I won't sledge your car door in for not putting
my name in your work. Really. Credit me, thank me, send me a fruit basket, set
my face as your desktop (I recommend this)
... all are nice, but none are mandatory.