From 9338a69e307c0051ef50d6365c5f45872a9d7ef7 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Fri, 22 Feb 2013 16:33:52 -0500 Subject: [PATCH] No ticket: Reduce size in anticipation of Sizzle-free builds (cherry picked from commit dbf3056b250bbc279fa947031181f9e25a40bacf) --- src/core.js | 3 ++- src/offset.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core.js b/src/core.js index b1ae40875..5fb6828ff 100644 --- a/src/core.js +++ b/src/core.js @@ -10,8 +10,9 @@ var core_strundefined = typeof undefined, // Use the correct document accordingly with window argument (sandbox) - document = window.document, location = window.location, + document = window.document, + docElem = document.documentElement, // Map over jQuery in case of overwrite _jQuery = window.jQuery, diff --git a/src/offset.js b/src/offset.js index fc110f012..b616a49a0 100644 --- a/src/offset.js +++ b/src/offset.js @@ -125,13 +125,13 @@ jQuery.fn.extend({ offsetParent: function() { return this.map(function() { - var offsetParent = this.offsetParent || document.documentElement; + var offsetParent = this.offsetParent || docElem; while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) { offsetParent = offsetParent.offsetParent; } - return offsetParent || document.documentElement; + return offsetParent || docElem; }); } }); -- 2.39.5