Tablesorter Pager: Options
Posted on: 08 Dec 2011 07:15:18 PST
Categories:
Codes
Javascript
Tablesorter Pager
Tags:
jquery
tablesorter
tablesorter pager
In my last post, I talked about tablesorter and tablesorter pager, and how to acquire and initialize them. Now, we will talk about the configuration options available for tablesorter pager.
Configuration
Tablesorter pager is configured by passing values in its constructor in JSON format. $('table').tablesorter().tablesorterPager({option:"value"});
The most commonly used option in Tablesorter Pager is the container
option, which defines where the Pager would be rendered. In fact, it is required to show the pager itself. Configuration Options
The following are all the available options used by Tablesorter Pager, as written in its source code. | Option | Description | Default |
---|---|---|---|
size | Defines the number of rows to display per page. | 10 | |
offset | – | 0 | |
page | Defines the offset of the table “page” shown by default. (currentpage+page) |
0 | |
totalRows | – | 0 | |
totalPages | – | 0 | |
container | Defines where the pager would be displayed. | null | |
cssNext | Defines the CSS class of the ‘next’ image. | .next | |
cssPrev | Defines the CSS class of the ‘prev’ image. | .prev | |
cssFirst | Defines the CSS class of the ‘first image. | .first | |
cssLast | Defines the CSS class of the ‘last’ image. | .last | |
cssPageDisplay | Defines the CSS class of the page display. | .pagedisplay | |
cssPageSize | Defines the CSS class of the ‘prev’ image. | .pagesize | |
seperator | Defines the separator for the current page and total number of pages. | / | |
positionFixed | Determines if position of pager is fixed or relative to the table to which it is attached. | true | |
appender | Defines the appender function for the pager. | this.pager |
Some notes: - I really don’t know what the options offset
, totalRows
and totalPages
are for. If someone discovers their use, please post it in the comments section.
- Notice that
seperator
is spelled with an ‘e’.
These are the only options Tablesorter Pager uses. In the next entries, I will post on how to apply your styles to the pager, among other things. ###### Related articles
- Tablesorter Pager: Acquisition and Initialization (quintophilosophy.wordpress.com)
Comments
None.