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