Usage:
Add JS and CSS files for the jQuery class library and jqPagination plug-in
Copy codeThe Code is as follows:
<Link rel = "stylesheet" href = "jqpagination.css"/>
<Script src = "jquery-1.6.2.min.js"> </script>
<Script src = "jquery. jqpagination. min. js"> </script>
The following HTML
Copy codeThe Code is as follows:
<Div class = "pagination">
<A href = "#" class = "first" data-action = "first"> «</a>
<A href = "#" class = "previous" data-action = "previous"> usage </a>
<Input type = "text" readonly = "readonly" data-max-page = "40"/>
<A href = "#" class = "next" data-action = "next"> › </a>
<A href = "#" class = "last" data-action = "last">» </a>
</Div>
Last initialize the plug-in
Copy codeThe Code is as follows:
$ ('. Pagination'). jqPagination ({
Link_string :'/? Page = {page_number }',
Current_page: 5, // set the current page to 1 by default
Max_page: 40, // set the maximum page to 1 by default
Page_string: 'Current page {current_page}, total page {max_page ',
Paged: function (page ){
// Send back an event...
}
});