core: fixed #2993: .offsetParent() will now return the body element in all browsers for fixed position elements.
This commit is contained in:
parent
c90fe0283b
commit
fa48ad1d1b
1 changed files with 1 additions and 1 deletions
|
@ -132,7 +132,7 @@ jQuery.fn.extend({
|
|||
},
|
||||
|
||||
offsetParent: function() {
|
||||
var offsetParent = this[0].offsetParent;
|
||||
var offsetParent = this[0].offsetParent || document.body;
|
||||
while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') )
|
||||
offsetParent = offsetParent.offsetParent;
|
||||
return jQuery(offsetParent);
|
||||
|
|
Loading…
Reference in a new issue