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?
I feel like $(‘.selector’, myContext) and myContext.find(‘.selector’) are two identical ways to get the
Share
$('.selector', myContext)and$(myContext).find('.selector')are completely equivalent:From the jQuery 1.4.2 source (core.js):