On May 6, 10:23 am, Adam <flynn...@gmail.com> wrote:
> Essentially, I'd like to know if there is any difference between
>
> $("div.grandparent > div.parent > div.child")
>
> and
>
> $("div.grandparent").children("div.parent").children("div.child")
>
> Does anyone know which of these is more performant or preferred when
> selecting child nodes?
>
> Thanks.

Best answer is a test:

http://jquery.nodnod.net/cases/353

The overhead of multiple returns and function calls when using children
() makes quite a difference.

Reply via email to