On 1/21/11, Garrett Smith <dhtmlkitc...@gmail.com> wrote:
> On 1/20/11, Steven Yang <kenshin...@gmail.com> wrote:
>> Hi
>> as I remembered a while ago maybe at jQuery 1.2x or 1.3x, people
>> recommended
>> using .find or $(selector, context), one thing is simply because .find
>> was
>> just faster. Then I think it was John himself said that they both should
>> do
>> the same thing (performance wise). Now at jQuery 1.4 or 1.5, I think the
>> two
>> methods should be the same speed.

Ah, I did not consider that the call to `jQuery` (aliased with `$`
here), which is using a `context` arg, is going to cause `oldSizzle`
to run. And so you might be right. But then again, that requires a
careful review of jQuery.prototype.init (the strangely placed
constructor function for a jQuery object). And I'm tired of slogging
through jQuery.

http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js

But a quick glance, you can see all the unqualified `document`
references which will surely cause problems when used cross-frame.

> Why? jQuery switches between native querySelectorAll and Sizzle. Or
> "oldSizzle".
[...]
-- 
Garrett

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/jsmentors@jsmentors.com/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/jsmentors@googlegroups.com/

To unsubscribe from this group, send email to
jsmentors+unsubscr...@googlegroups.com

Reply via email to