Reputation: 728
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();
Upvotes: 0
Views: 364
Reputation: 23074
$('.tablesorter > tbody')each(function(){
$(this).children('tr:lt(5)').remove();
});
Upvotes: 1