jquery-simple-pagination
v0.0.3
Published
Simple jquery plugin for pagination with radio input
Downloads
105
Readme
jQuery Simple Pagination
Simple plugin for pagination with radio input
Getting Started
Include styles & scripts
<head>
<link href="jquery.simple-pagination.min.css" rel="stylesheet">
<script src="jquery.min.js"></script>
<script src="jquery.simple-pagination.min.js"></script>
</head>
Add container for pagination
<div id="container"></div>
Initialize plugin
var example = $('#container').simplePagination({
current: 7,
count: 14,
name: 'page'
});
$('#container input[name=page]').change(function() {
console.log($(this).val());
});
$('#prev').click(function() { example.setPrevPage(); });
$('#next').click(function() { example.setNextPage(); });
$('#reset').click(function() { example.setPage(1); });
Init with "mirrorContainer"
<div id="container"></div>
<div class="catalog">...</div>
<div id="mirror"></div>
$(document).ready(function(){
$('#container').simplePagination({
current: 7,
count: 14,
name: 'page',
mirrorContainer: '#mirror'
});
});