I can't speak for Sizzle but, if you'll only ever have one "nav"
element on a page, you're better off using an ID than a class.

On Tue, Jun 30, 2009 at 8:03 AM, north<ollo...@web.de> wrote:
>
> Hi,
>
> yesterday I read an article about jQuery performance. In one part the
> author talks about selectors and uses
>
> .nav li a
>
> as an example. He states that before jQuery 1.3., the selector
>
> ul.nav a
>
> would have been the best way to get all links in the list. In jQuery
> 1.3., due to the inclusion of Sizzle,
>
> .nav li > a
>
> "should" be the best way. He doesn't mention any speed tests though,
> and only briefly explains that the reason for this is Sizzle's way of
> walking through selectors from right to left.
>
> Can anyone confirm this "theory"?
>
> Thanks!

Reply via email to