Rewrite the defaults with $.fn.pagination.defaults.
Depend on
LinkButton
Usage
Copy Code code as follows:
<div id= "pp" style= "background: #efefef; border:1px solid #ccc;" ></div>
Copy Code code as follows:
$ (' #pp '). Pagination ({
total:2000,
Pagesize:10
});
Characteristics
Name |
Type |
Description |
Default value |
Total |
Number |
The total number of records should be set when pagination is created. |
1 |
PageSize |
Number |
The page size. (Translator Note: The maximum number of records displayed per page) |
10 |
PageNumber |
Number |
the page number to display when the pagination is created. |
1 |
PageList |
Array |
The user can change the page size. The pagelist feature defines how large a size can be changed. |
[10,20,30,50] |
Loading |
Boolean |
Defines whether the data is being loaded. |
False |
Buttons |
Array |
Custom buttons are defined with two attributes per button: Iconcls:CSS class , which will display a background picture Handler: The processing function when the button is clicked. |
Null |
Showpagelist |
Boolean |
Defines whether to display a list of pages. |
True |
Showrefresh |
Boolean |
Defines whether the Refresh button is displayed. |
True |
Beforepagetext |
String |
displays a label before the input component . |
Page |
Afterpagetext |
String |
displays a label after the input component . |
of {pages} |
Displaymsg |
String |
Displays page information. |
displaying {from} to {to} of the {total} items |
Event
Name |
Parameters |
Description |
Onselectpage |
PageNumber, PageSize |
Triggered when the user selects a new page. The callback function contains two parameters: PageNumber: New page number PageSize: New Page size |
Onbeforerefresh |
PageNumber, PageSize |
Refresh the button before clicking the trigger, return false to cancel the refresh action. |
Onrefresh |
PageNumber, PageSize |
triggered after refreshing. |
Onchangepagesize |
PageSize |
Triggered when the user changes the page size. |
Methods
Name |
Parameters |
Description |
Options |
None |
Returns an options object. |
Loading |
None |
Turn the pagination into a loading (loading) state. |
Loaded |
None |
Turn the pagination into a load complete (loaded) state. |