From 9ebc27db54194c88fa7aed29a8c648c330300ac8 Mon Sep 17 00:00:00 2001 From: Dave Methvin Date: Wed, 18 Apr 2012 13:04:04 -0400 Subject: Remove $("body") case; $(document.body) is 2x faster. --- src/core.js | 9 --------- src/sizzle | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/core.js b/src/core.js index 4e38deaeb..f317666ce 100644 --- a/src/core.js +++ b/src/core.js @@ -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? diff --git a/src/sizzle b/src/sizzle index 912a8218c..feebbd7e0 160000 --- a/src/sizzle +++ b/src/sizzle @@ -1 +1 @@ -Subproject commit 912a8218c36f6136d694a0915eb92bdf3e7b5e41 +Subproject commit feebbd7e053bff426444c7b348c776c99c7490ee -- cgit v1.2.3