mirror of
https://github.com/jquery/jquery.git
synced 2024-10-05 11:34:18 +00:00
No ticket: Reduce size in anticipation of Sizzle-free builds
(cherry picked from commit dbf3056b25
)
This commit is contained in:
parent
85ee87b444
commit
9338a69e30
@ -10,8 +10,9 @@ var
|
|||||||
core_strundefined = typeof undefined,
|
core_strundefined = typeof undefined,
|
||||||
|
|
||||||
// Use the correct document accordingly with window argument (sandbox)
|
// Use the correct document accordingly with window argument (sandbox)
|
||||||
document = window.document,
|
|
||||||
location = window.location,
|
location = window.location,
|
||||||
|
document = window.document,
|
||||||
|
docElem = document.documentElement,
|
||||||
|
|
||||||
// Map over jQuery in case of overwrite
|
// Map over jQuery in case of overwrite
|
||||||
_jQuery = window.jQuery,
|
_jQuery = window.jQuery,
|
||||||
|
@ -125,13 +125,13 @@ jQuery.fn.extend({
|
|||||||
|
|
||||||
offsetParent: function() {
|
offsetParent: function() {
|
||||||
return this.map(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" ) ) {
|
while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
|
||||||
offsetParent = offsetParent.offsetParent;
|
offsetParent = offsetParent.offsetParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
return offsetParent || document.documentElement;
|
return offsetParent || docElem;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user