I feel like $('.selector', myContext)
and myContext.find('.selector')
are two identical ways to get the same information. Is there a practical reason when you would use one over the other? Speed perhaps?
$('.selector', myContext)
and $(myContext).find('.selector')
are completely equivalent:
From the jQuery 1.4.2 source (core.js):
//...
// HANDLE: $(expr, context)
// (which is just equivalent to: $(context).find(expr)
} else {
return jQuery( context ).find( selector );
}
//...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With