1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/mochitest/ajax/jquery/test/data/offset/fixed.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,33 @@ 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>fixed</title> 1.10 + <style type="text/css" media="screen"> 1.11 + body { margin: 1px; padding: 5px; } 1.12 + div.fixed { position: fixed; margin: 1px; border: 2px solid #000; padding: 5px; width: 100px; height: 100px; background: #fff; overflow: hidden; } 1.13 + #fixed-1 { top: 0; left: 0; } 1.14 + #fixed-2 { top: 20px; left: 20px; } 1.15 + #forceScroll { width: 5000px; height: 5000px; } 1.16 + #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; } 1.17 + </style> 1.18 + <script type="text/javascript" src="../../../dist/jquery.js"></script> 1.19 + <script type="text/javascript" charset="utf-8"> 1.20 + $(function() { 1.21 + window.scrollTo(1000,1000); 1.22 + $('.fixed').click(function() { 1.23 + $('#marker').css( $(this).offset() ); 1.24 + return false; 1.25 + }); 1.26 + }); 1.27 + </script> 1.28 + </head> 1.29 + <body> 1.30 + <div id="fixed-1" class="fixed"></div> 1.31 + <div id="fixed-2" class="fixed"></div> 1.32 + <div id="forceScroll"></div> 1.33 + <div id="marker"></div> 1.34 + <p class="instructions">Click the white box to move the marker to it.</p> 1.35 + </body> 1.36 +</html> 1.37 \ No newline at end of file