Skip to content
Permalink
Browse files

core: fixed #2993: .offsetParent() will now return the body element i…

…n all browsers for fixed position elements.
  • Loading branch information
scottgonzalez committed Jun 6, 2008
1 parent c90fe02 commit fa48ad1d1be18482dbabe58182025a8d22dee236
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/offset.js
@@ -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);

0 comments on commit fa48ad1

Please sign in to comment.
You can’t perform that action at this time.