Faster? aren't they just equivalent?

according to the comments in the library file they are

// HANDLE: $(expr, [context])
// (which is just equivalent to: $(content).find(expr)
        } else
return jQuery( context ).find( selector );

On Oct 18, 2:05 am, Michael Geary <m...@mg.to> wrote:
> $('div',this) is simply a confusing way of writing $(this).find('div'). The
> only reason it exists at all is for "historical reasons": it was added to
> jQuery before the .find() method existed.
>
> Never use $('div',this) in your code. Always use $(this).find('div')
> instead. It is easier to read and faster too.
>
> -Mike
>
> On Tue, Sep 29, 2009 at 4:24 AM, runrunforest <craigco...@gmail.com> wrote:
>
> > Hi,
>
> > $('div', this)   what does that mean ?

Reply via email to