Install via npm:
npm install paginate-next --save
Or via CDN:
<script src="https://unpkg.com/paginate-next/dist/paginationts.js" />
<link rel="stylesheet" href="https://unpkg.com/paginate-next/dist/pagination.css" />
Paginate:
<div id="dataContainer"></div>
<div id="paginateContainer"></div>
const paginationIns = pagination("#paginateContainer", {
dataSource: [1, 2, 3, 4, 5, 6 ],
callback: function(data, pagination) {
var html = template(data);
document.getElementById("dataContainer").html(html);
}
})
That's it! ⭐
MIT 💜