Table Pager
Submitted by marius on Thu, 04/30/2009 - 10:10
I wanted to do this a long time ago but I had no time. This is a simple jquery plugin that add a pager to any html table you want.
Demo
| This is the table header |
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 |
| 10 |
| 11 |
| 12 |
| 13 |
| 14 |
| 15 |
| 16 |
| 17 |
| 18 |
| 19 |
| 20 |
| 21 |
| 22 |
| 23 |
| 24 |
| 25 |
| 26 |
| 27 |
| 28 |
| 29 |
| 30 |
How to use
$(".table-pager").addTablePager();
or
$(".table-pager").addTablePager({results : 5, position : "top"});
Download
Click here to download the table pager plugin.
Available options
results: the number of rows to display at once
position: where to display the pager links - "top" or "bottom"
prevBut: the text on the Previous page button
nextBut: the text on the Next page button
infos: "Page #1 of #2" Additional info to display (#1 and #2 are wildcards - #1: current page, #2: total pages)
Additional Info
- Tested with IE 6+, Firefox 3, Safari 4 and Opera 9
- jQuery 1.3.2 (it should work with previous releases of jQuery, but I didn't test it)
Tags:



So Good
Well done, and thank you so much
How would you dunamically
How would you dunamically change the number of results per page?
this feature is not
this feature is not implemented yet
Very small and effective plugin
This is very useful, effective and easy to use.
It would be nice, if I could place the "previous" and "next" button in different positions like before or after the "infos" text.
Like " << previous Page 1 of 3 next >> ", if you know, what I mean.
Best regards,
Christian
Post new comment