jQuery display 5 records on multiple tables
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();
});
精彩评论