Hi there... i have n-tables on a page. I need to go through every table on the page and within each table i need to add a class to the rows but NOT the first 5 rows.
my current js:
$('.selector').each(function(){
var trCount = $("tbody > tr", this).size();
alert(trCount);
});
this goes through and tells me how many tr's i have in each row. hoever i need to then go through each row and if the current row is more than the 5th row then add classes to it..
so hopefully i get the following.
<table class='selector'>
<tr><td>A</td></tr>
<tr><td>A</td></tr>
<tr><td>A</td></tr>
<tr><td>A</td></tr>
<tr><td>A</td></tr>
<tr class='hidden'><td>A</td></tr>
<tr class='hidden'><td>A</td></tr>
<tr class='hidden'><td>A</td></tr>
<tr class='hidden'><td>A</td></tr>
<tr class='hidden'><td>A</td></tr>
</table>