Pagination. js, pagination. js
The project has the paging function, which was previously written by myself. The style is not easy to view and the function is simple. I found this plug-in pagination. js.
Page import pagination. js
Html code
1 <div class="list_button">2 </div>
Js Code
1 $ ('. list_button '). pagination ({2 totalData: count, 3 pageCount: pageCount, 4 showData: limitValue, 5 current: 1, 6 jump: true, 7 coping: true, 8 count: 2, 9 homePage: 'homepage', 10 endPage: 'Last page', 11 prevContent: 'previous page', 12 nextContent: 'Next page', 13 callback: pageCallback // pageCallback () call the function for paging. 14 });
1 function pageCallback (api) {2 var pageNo = 1 // current page number 3 if (api) {4 pageNo = api. getCurrent () // get current Code 5} 6}
Reference address (downloadable): http://www.jq22.com/jquery-info5697
Demo address: http://maxiaoxiang.com/jQuery-plugins/plugins/pagination.html
Js: https://github.com/zhaobao1830/paginationjs