Remove $("body") case; $(document.body) is 2x faster.

This commit is contained in:
Dave Methvin 2012-04-18 13:04:04 -04:00 committed by Rick Waldron waldron.rick@gmail.com
parent abd2a07498
commit 9ebc27db54
2 changed files with 1 additions and 10 deletions

View File

@ -90,15 +90,6 @@ jQuery.fn = jQuery.prototype = {
return this;
}
// The body element only exists once, optimize finding it
if ( selector === "body" && !context && document.body ) {
this.context = document;
this[0] = document.body;
this.selector = selector;
this.length = 1;
return this;
}
// Handle HTML strings
if ( typeof selector === "string" ) {
// Are we dealing with HTML string or an ID?

@ -1 +1 @@
Subproject commit 912a8218c36f6136d694a0915eb92bdf3e7b5e41
Subproject commit feebbd7e053bff426444c7b348c776c99c7490ee