]> source.dussan.org Git - jquery.git/commitdiff
Include scroll offsets for everything but inline and table-row elements
authorBrandon Aaron <brandon.aaron@gmail.com>
Tue, 11 Sep 2007 01:08:51 +0000 (01:08 +0000)
committerBrandon Aaron <brandon.aaron@gmail.com>
Tue, 11 Sep 2007 01:08:51 +0000 (01:08 +0000)
src/offset.js

index 19090ac091a61f8c8c25ce7ccc0a9898238874d7..9c43296fe617743688d0924c0e16af974a7c16b9 100644 (file)
@@ -57,7 +57,7 @@ jQuery.fn.offset = function() {
                        // Get parent scroll offsets
                        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")) )
+                               if ( !/^inline|table-row.*$/i.test(jQuery.css(parent, "display")) )
                                        // Subtract parent scroll offsets
                                        add( -parent.scrollLeft, -parent.scrollTop );