Take the 2-minute tour ×

<a href="#">2</a>.

Here I want to make pagination that will show only 3 <tr>s each time. No of <tr> is dynamic. So page no will also be calculated. How can I do that?

Please help. Thanks in advance.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

I'd make a function which sets a current_row variable and references it against $('tr').eq(whatever). Make it iterate 3 times either direction, show() the applicable rows and hide() the siblings()

share|improve this answer
and how can u do this exactly ?? :D –  Zalaboza Sep 7 '11 at 19:08
@Momen M El Zalabany something like this: jsfiddle.net/AlienWebguy/gzXUv –  AlienWebguy Sep 7 '11 at 21:18
@AlienWebguy Thanks for the fiddle. I was looking for something similar. –  V15HM4Y Jun 27 '13 at 9:57
@AlienWebguy But, but when the tr items are over and we click it on next, it goes to first page. How to stop that? –  V15HM4Y Jun 27 '13 at 10:19
add comment

Your Answer


