I'm trying to add the first 10 rows in an HTML table to the same numbered class (and increment the class by 1 for rows 11-20, and again through all the rows of the table).
"Scott Fell" provided a solution for a related question I asked last week.
I found an example that adds class 1-6 to every row, then restarts after every 6 rows -- but I'm trying to add the same class to the first 10 rows, then add the next 10 to "class 2", the next 10 to class 3, etc...
var i = 0;
i = 1;
$(this).addClass('class-' + i);
I'm trying to display only 10 rows of a table at a time on an HTML page -- Scott Fell recommended the 'class' idea in his previous post - but I can't figure out how to assign 10 rows at a time to the same class. Thank you.