开发者

Jquery Pagination with <tr>

开发者 https://www.devze.com 2023-03-22 17:34 出处:网络
<table> <tbody> <th></th> <tr></tr> <tr></tr> <tr></tr>
<table>
  <tbody>
      <th></th>
      <tr></tr>
      <tr></tr>
      <tr></tr>
      <tr></tr>
      <tr></tr>
      <tr></tr>
      <tr></tr>
   开发者_如何转开发   <tr></tr>
      <tr></tr>
      ...
  </tbody>  
</table>

<a href="#">&lt;&lt;</a>
<a href="#">1</a>
<a href="#">2</a>.
....
<a href="#">&gt;&gt;</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.


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()

0

精彩评论

暂无评论...
验证码 换一张
取 消