diff options
author | Brandon Aaron <brandon.aaron@gmail.com> | 2007-09-11 00:43:12 +0000 |
---|---|---|
committer | Brandon Aaron <brandon.aaron@gmail.com> | 2007-09-11 00:43:12 +0000 |
commit | 2608bae43818bbb3b828e35a2684d0a8a51cb5ab (patch) | |
tree | 8acf406fb7f7aafac55036f30c0da591418a6cf0 /src/offset.js | |
parent | a36771c83e8a8317b70ff2372cbbefd87e4d9dce (diff) | |
download | jquery-2608bae43818bbb3b828e35a2684d0a8a51cb5ab.tar.gz jquery-2608bae43818bbb3b828e35a2684d0a8a51cb5ab.zip |
Couple of fixes to the offset method
Diffstat (limited to 'src/offset.js')
-rw-r--r-- | src/offset.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/offset.js b/src/offset.js index 674338ecb..19090ac09 100644 --- a/src/offset.js +++ b/src/offset.js @@ -55,7 +55,7 @@ jQuery.fn.offset = function() { } // Get parent scroll offsets - while ( parent.tagName && /^body|html$/i.test(parent.tagName) ) { + while ( parent.tagName && !/^body|html$/i.test(parent.tagName) ) { // Work around opera inline/table scrollLeft/Top bug if ( /^inline|table-row.*$/i.test(jQuery.css(parent, "display")) ) // Subtract parent scroll offsets @@ -70,7 +70,7 @@ jQuery.fn.offset = function() { } // Safari doubles body offsets with an absolutely positioned element or parent - if ( safari && absolute ) + if ( safari2 && absolute ) add( -doc.body.offsetLeft, -doc.body.offsetTop ); } |