jquery plug-in web2.0 pagination script, available for Ajax without refreshing paging _jquery

Source: Internet
Author: User
Generate JS page footer
No Sword (2008-03-05) * * *
Modification Date: 2008-3-12
Add two parameters: Displaynum,displaylastnum can freely customize the number of page numbers displayed

Parameters: Pagesize:10//page number of pages displayed
, count:0//Data bar count
, CSS: "Mj_pagefoot"//footer CSS style class
, Current:1//Current page number
, Displaynum:7//median number of pages displayed
, Displaylastnum:5//last page number displayed
, Previous: Previous page//previous display style
, Next: Next page//next page display style
, callback function when paging:null//paging event is triggered

Use:
$ ("div"). Pagefoot ({
Pagesize:10,
COUNT:500,
CSS: "Mj_pagefoot",
Previous: "<",
Next: ">",
Paging:function (page) {
Alert ("Current First" +page+ "page");
}
});
The above code adds a footer code for all Div
*/
In particular, one of the parameters should be stated: Paging

1 This parameter is the action that triggers when the page is divided into footer, if you do not add something in this action, this page will not be normal action, so you can join:
Paging:function (page) {
location.href= "page=" +page;
}
Of course, in order to keep the page number position, you will need to assign the current page number to the parameter when you refresh the page:
, and if you don't assign it to it, the default value is the first page ...

2 If you add some load data of the action can be used as Ajax no refresh, hehe
Paging:function (page) {
Ajax.loaddata (page);
}
No technical content, right when practicing it, haha
Copy Code code as follows:

JackLee:paging:function (page) {
location.href= "page=" +page;
}
Is there a problem with this??
When you point to page 10th, in Div navigation on page 1th is currently, I think should make the 10th page is current only right Ah!
--------------------------------------------------------
You didn't notice here OH:
---
Of course, in order to keep the page number position, you will need to assign the current page number to the parameter when you refresh the page:
, and if you don't assign it to it, the default value is the first page ...
---
You have to manually assign the page to it after reloading it.
If you don't want to do this, it will be better to use Ajax for pagination, and it won't be too much trouble.

Online Demo http://img.jb51.net/online/jquery.pageFoot/DEMO.htm
File Packaging Http://img.jb51.net/online/jquery.pageFoot/jquery.pageFoot.rar

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.