git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c90fe02
)
core: fixed #2993: .offsetParent() will now return the body element in all browsers...
author
Scott González
<scott.gonzalez@gmail.com>
Fri, 6 Jun 2008 00:28:33 +0000
(
00:28
+0000)
committer
Scott González
<scott.gonzalez@gmail.com>
Fri, 6 Jun 2008 00:28:33 +0000
(
00:28
+0000)
src/offset.js
patch
|
blob
|
history
diff --git
a/src/offset.js
b/src/offset.js
index
f0adae0
..
1ae3f2e
100644
(file)
--- a/
src/offset.js
+++ b/
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);