]> source.dussan.org Git - jquery.git/commitdiff
Added another relative offset test
authorBrandon Aaron <brandon.aaron@gmail.com>
Tue, 4 Dec 2007 21:29:28 +0000 (21:29 +0000)
committerBrandon Aaron <brandon.aaron@gmail.com>
Tue, 4 Dec 2007 21:29:28 +0000 (21:29 +0000)
test/data/offset/relative.html
test/unit/offset.js

index dc78976b9b722cc8bd8748a118f0010ac5d201ab..8a2aa939419766394a6e1e37f0fd27d1625eee94 100644 (file)
                </script>
        </head>
        <body>
-               <div id="relative-1" class="relative">relative-1
-                       <div id="relative-1-1" class="relative">relative-1-1
-                               <div id="relative-1-1-1" class="relative">relative-1-1-1</div>
-                       </div>
-               </div>
-               <div id="relative-2" class="relative">relative-2</div>
+               <div id="relative-1" class="relative"><div id="relative-1-1" class="relative"><div id="relative-1-1-1" class="relative"></div></div></div>
+               <div id="relative-2" class="relative"></div>
                <div id="marker"></div>
        </body>
 </html>
\ No newline at end of file
index 835df89e3351f6858c57bf1d12ed6a2bb0fd92f1..857e0898e152dd74dfd10bb65bc9c05d783d0b6d 100644 (file)
@@ -44,6 +44,9 @@ testwin("relative", function() {
        equals( $w('#relative-1').offset().top, jQuery.browser.msie ? 6 : 7, "$('#relative-1').offset().top" );
        equals( $w('#relative-1').offset().left, 7, "$('#relative-1').offset().left" );
        
+       equals( $w('#relative-1-1').offset().top, jQuery.browser.msie ? 13 : 15, "$('#relative-1-1').offset().top" );
+       equals( $w('#relative-1-1').offset().left, 15, "$('#relative-1-1').offset().left" );
+       
        equals( $w('#relative-2').offset().top, jQuery.browser.msie ? 141 : 142, "$('#relative-2').offset().top" );
        equals( $w('#relative-2').offset().left, 27, "$('#relative-2').offset().left" );