Just canvassing opinions on the :nth-of-type() selector that is in now being
tested in the  http://www.softwareunity.com/sandbox/JQueryMoreSelectors/
Selectors Plugin  (plus other ...-of-type selectors).

At face value it would 
http://www.nabble.com/nth-of-type-not-working-in-some-cases-tf2356344.html#a6571942
appear to be the same as :eq()  but I think there's more to it...

In a JQuery set containing 3 DIVs and 3 SPANs (#div0, #div1, #div2, #span0,
#span1 #span2),
I would expect :eq(1) to return only div1, but :nth-of-type(1) to return
div1 and span1.
Does this seem correct to you?

Taking it a step further, if the set also contains another 3 DIVs (#divX,
#divY, and #divZ) that are not siblings of div0,1,2 (ie they have different
parents) then my current implementation of :nth-of-type(1) will return div1,
span1 and divY. I think I've done it wrong. Should it still return only div1
and span1? I think I've done :nth-sibling-of-type() by mistake!

Thanks for you help,

George




-- 
View this message in context: 
http://www.nabble.com/How-should-%3Anth-of-type-work--tf2375279.html#a6617459
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to