Using jQuery how do I select a range of rows?

You can apply more than one filter at a time, although the 2nd filter applies to the results of the first, so the following would highlight starting from the 4th row (skips 0..2), and highlight for 3 rows (includes 0..2):

$('#t tr:gt(2):lt(3)').css('background-color', '#f00');

Leave a Comment