1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/mochitest/ajax/jquery/test/data/offset/scroll.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 1.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 1.5 + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 1.6 +<html> 1.7 + <head> 1.8 + <meta http-equiv="Content-type" content="text/html; charset=utf-8"> 1.9 + <title>scroll</title> 1.10 + <style type="text/css" media="screen"> 1.11 + body { margin: 1px; padding: 5px; } 1.12 + div.scroll { position: relative; margin: 1px; border: 2px solid #000; padding: 5px; width: 100px; height: 100px; background: #fff; overflow: auto; } 1.13 + #scroll-1 { top: 0; left: 0; } 1.14 + #scroll-1-1 { top: 1px; left: 1px; } 1.15 + #scroll-1-1-1 { top: 1px; left: 1px; } 1.16 + #forceScroll { width: 5000px; height: 5000px; } 1.17 + #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; } 1.18 + </style> 1.19 + <script type="text/javascript" src="../../../dist/jquery.js"></script> 1.20 + <script type="text/javascript" charset="utf-8"> 1.21 + $(function() { 1.22 + window.scrollTo(1000,1000); 1.23 + $('#scroll-1')[0].scrollLeft = 5; 1.24 + $('#scroll-1')[0].scrollTop = 5; 1.25 + $('.scroll').click(function() { 1.26 + $('#marker').css( $(this).offset() ); 1.27 + return false; 1.28 + }); 1.29 + }); 1.30 + </script> 1.31 + </head> 1.32 + <body> 1.33 + <div id="scroll-1" class="scroll"> 1.34 + <div id="scroll-1-1" class="scroll"> 1.35 + <div id="scroll-1-1-1" class="scroll"></div> 1.36 + </div> 1.37 + </div> 1.38 + <div id="forceScroll"></div> 1.39 + <div id="marker"></div> 1.40 + <p class="instructions">Click the white box to move the marker to it.</p> 1.41 + </body> 1.42 +</html> 1.43 \ No newline at end of file