Ajax Paging Components
I am on average every week out of an open source JS component for the goal, although each component is not very large, it only completed a small part of the work, but I believe that as long as there is pay, will always be rewarded. This component mainly completes the paging work.
This picture shows the two basic forms of the paging control, which can be customized, including the copy content.
The demo address for this paging control is: http://www.lovewebgames.com/jsmodule/paging.html
At the same time, it is open source, its git address is: https://github.com/tianxiangbing/paging
Paging
Pagination Control Paging Example see demo
Examples of Use methods:
<div id= "Pagetool" ></div>$ (' #pageTool '). Paging ({pagesize:10,count:100});
Or
var p = new Paging ();p. Init ({target: ' #pageTool ', pagesize:10,count:100});
Properties and Methods pagesize:
Number of bars per page
Current
Current page number, default is 1
Prevtpl
Previous page of the template, default "previous"
Nexttpl
Next page of the template, default "Next page"
Firsttpl
Homepage template, default "home"
Lasttpl
End of template, default "last"
Ellipsetpl
Ellipsis template, default "..."
Toolbar:bool
Whether the toolbar is displayed, false by default
Pagesizelist:[]
When the toolbar is displayed, you can set the number of bars per page, and the default is [5,10,15,20]
Changepagesize:function (PS)
Modify the number of bars per page with the parameter int
Go:function (P)
Jump to a page, default to current
Render:function (OPS)
Re-render, ops:{count:int,pagesize:int,current:int,pagecount:int}
[JS Open Source Component Development]ajax pagination component