pageturner
v1.0.2
Published
npm package to create automatic pagination out of a list of repeating elements on an html page
Downloads
3
Maintainers
Readme
pageturner
A basic pagination utility for websites that allows for configuration of the pagination elements and styles.
Usage
$ npm install pageturner --save
Move the imported folder from node_modules to your public folder of js scripts. You can use the original source file with any version of jQuery you'd like.
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="your_js_folder/pageturner/src/pageturner.js"></script>
<script>
var pageTurner = new PageTurner({
"animate": "slow",
"itemClass": "page-item",
});
pageTurner.render();
</script>
Using with webpack
PageTurner will return the PageTurner constructor based on jQuery version 3.
// import PageTurner
var PageTurner = require('pageturner');
// Configure and render pagination
var pageTurner = new PageTurner({
"animate": "slow",
"itemClass": "page-item",
});
pageTurner.render();