]> source.dussan.org Git - jquery.git/commitdiff
No ticket: Reduce size in anticipation of Sizzle-free builds
authorRichard Gibson <richard.gibson@gmail.com>
Fri, 22 Feb 2013 21:33:52 +0000 (16:33 -0500)
committerRichard Gibson <richard.gibson@gmail.com>
Fri, 22 Feb 2013 21:33:52 +0000 (16:33 -0500)
src/core.js
src/offset.js

index 4115c5eae01fec50c48cc9a4386dbbca891a4fb2..7a854e7f48e9a7c3c45d04fce516ee2b910ea137 100644 (file)
@@ -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,
index 4efb962ff2abf95de509ceaf71685316ed0c86bf..e6fd3574c678f6cb8cab9b151cf93ac148929a64 100644 (file)
@@ -123,11 +123,11 @@ 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;
                });
        }
 });