« Return to Thread: :eq versus eq()
Re: :eq versus eq()
Good point Pierre!
Well noted. TKS.
Any others possible differences?
Maurício
-----Mensagem Original-----De: fcypba@...Para: jquery-en@...Enviada em: quarta-feira, 10 de junho de 2009 13:25Assunto: [jQuery] Re: :eq versus eq()With the traversing method, you can match a set of elements then select, for example, the third one$('.myclass,#myid').eq(2)I didn't use the traversing method but i think that is one of possible usagePierre
2009/6/10 Maujor <css.maujor@...>
According jQuery documentation [1][2]
:eq returns Array <Element> and eq() returns one jQuery object.
What does means "Array <Element>"? It is a single element?
By the other hand eq() => "Reduce the set of matched elements to a single
element."
So, both returns a single element and it seems to me that there isn't any
difference between :eq and eq().
Is one faster than the other?
Why are there two sintaxes to achieve the same task? Or am I missing
sometghing?
[1] http://docs.jquery.com/Selectors
[2] http://docs.jquery.com/Traversing
-----
Maurício Samy Silva
--
View this message in context: http://www.nabble.com/%3Aeq-versus-eq%28%29-tp23962849s27240p23962849.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Maurício Samy Silva
« Return to Thread: :eq versus eq()
| Free embeddable forum powered by Nabble | Forum Help |