Table Pager

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)

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

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.