[JS Open Source Component Development]ajax pagination component

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.