Couple of fixes to the offset method
This commit is contained in:
parent
a36771c83e
commit
2608bae438
1 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,7 @@ jQuery.fn.offset = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get parent scroll offsets
|
// 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
|
// Work around opera inline/table scrollLeft/Top bug
|
||||||
if ( /^inline|table-row.*$/i.test(jQuery.css(parent, "display")) )
|
if ( /^inline|table-row.*$/i.test(jQuery.css(parent, "display")) )
|
||||||
// Subtract parent scroll offsets
|
// Subtract parent scroll offsets
|
||||||
|
@ -70,7 +70,7 @@ jQuery.fn.offset = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Safari doubles body offsets with an absolutely positioned element or parent
|
// Safari doubles body offsets with an absolutely positioned element or parent
|
||||||
if ( safari && absolute )
|
if ( safari2 && absolute )
|
||||||
add( -doc.body.offsetLeft, -doc.body.offsetTop );
|
add( -doc.body.offsetLeft, -doc.body.offsetTop );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue