I'm trying to figure out an efficient way to select a range of table rows. What I'd like to do is select perhaps rows 11 through 19.
I want to have the selector put the desired rows into the jquery object instead of grabbing all rows and looping through them to operate only on the ones I want. I keep thinking something like this where the .not() sets the range. It seems almost right but I know its not. var firstRow = 11, lastRow = 19; $('#myTable tr').not(':lt(' + firstRow + '), :gt(' + lastRow + ')'); I know it's simple I just haven't hit on it yet.