开发者

jQuery display 5 records on multiple tables

开发者 https://www.devze.com 2023-02-25 21:00 出处:网络
I have multiple tables using tablesorter on a page but only need to show the top 5 results on each. I have tried to expand on this but it is only keeping first in the first table. 开发者_如何学运维I

I have multiple tables using tablesorter on a page but only need to show the top 5 results on each.

I have tried to expand on this but it is only keeping first in the first table. 开发者_如何学运维I need this done on each table.

$('.tablesorter > tbody').children('tr:not(:first)').remove();


$('.tablesorter > tbody')each(function(){
   $(this).children('tr:lt(5)').remove();
});
0

精彩评论

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

关注公众号