aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Gibson <richard.gibson@gmail.com>2013-02-22 16:33:52 -0500
committerRichard Gibson <richard.gibson@gmail.com>2013-02-22 16:36:39 -0500
commit9338a69e307c0051ef50d6365c5f45872a9d7ef7 (patch)
treec30929474720a73b5b338dc45ab455489fd63b4b /src
parent85ee87b4444e1322f3a5b1a033902b3f9764b1ef (diff)
downloadjquery-9338a69e307c0051ef50d6365c5f45872a9d7ef7.tar.gz
jquery-9338a69e307c0051ef50d6365c5f45872a9d7ef7.zip
No ticket: Reduce size in anticipation of Sizzle-free builds
(cherry picked from commit dbf3056b250bbc279fa947031181f9e25a40bacf)
Diffstat (limited to 'src')
-rw-r--r--src/core.js3
-rw-r--r--src/offset.js4
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;
});
}
});