Klaus, you are correct.  Had a hard time keeping it straight last night, but
if you want to start at the 11th row, you would start at 10 and if you
wanted to end at the 19th row, you would use 18.

On 8/29/07, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
>
> Stuart wrote:
> > 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.
>
>
> Have you tried (pre jQuery 1.1.4.):
>
> $('tr').lt(19).gt(10);
>
> If you're using jQuery 1.1.4 you should use the new slice method:
>
> $('tr').slice(10, 18);
>
> (not sure about the correct numbers right now)
>
>
>
> --Klaus
>



-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com

Reply via email to