You can apply several filters at a time, although the second filter applies to the results of the first, so the following will mean starting from the 4th line (skips 0..2) and selects 3 lines (includes 0..2):
$('#t tr:gt(2):lt(3)').css('background-color', '#f00');
source
share