Thanks for the report, Pete. It sounds like my suspicion was correct -
jQuery applies the :gt() to the *entire* result set at that point, instead
of the immediately preceding selector.

Iin other words, this selector:

    .itemList .item:gt(9)

is interpreted as (using double parens to indicate grouping):

    (( .itemList .item )) :gt(9)

Personally I find this a bit counterintuitive - I would have naively
expected it to be interpreted as:

    .itemList (( .item:gt(9) ))

I'll take this up in the dev group - thanks for checking it out.

-Mike

> From: pedalpete
> 
> thanks for your help Michael,
> 
> I had been trying $(this +' .item') rather than $('.item', this).
> 
> Unfortunately your incredibly concise code which put the 
> entire function into one line only worked on the first list item.
> 
> But things are working now with the code you supplied 
> $('.item:gt(9)', this).
> 
> Thanks again,
> Pete

Reply via email to