When a native browser event is bubbling up the DOM, make sure that the correct isDefa...
[jquery.git] / test / data / offset / static.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html>
4         <head>
5                 <meta http-equiv="Content-type" content="text/html; charset=utf-8">
6                 <title>static</title>
7                 <style type="text/css" media="screen">
8                         body { margin: 1px; padding: 5px; }
9                         div.static { position: static; top: 0; left: 0; margin: 1px; border: 2px solid #000; padding: 5px; width: 100px; height: 100px; background: #fff; overflow: hidden; }
10                         #static-2 { top: 20px; left: 20px; }
11                         #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
12                 </style>
13                 <script src="../../../src/core.js"></script>
14                 <script src="../../../src/support.js"></script>
15                 <script src="../../../src/sizzle/sizzle.js"></script>
16                 <script src="../../../src/sizzle-jquery.js"></script>
17                 <script src="../../../src/traversing.js"></script>
18                 <script src="../../../src/data.js"></script>
19                 <script src="../../../src/event.js"></script>
20                 <script src="../../../src/css.js"></script>
21                 <script src="../../../src/offset.js"></script>
22                 <script type="text/javascript" charset="utf-8">
23                         $(function() {
24                                 $('.static').click(function() {
25                                         $('#marker').css( $(this).offset() );
26                                         var pos = $(this).position();
27                                         $(this).css({ position: 'absolute', top: pos.top, left: pos.left });
28                                         return false;
29                                 });
30                         });
31                 </script>
32         </head>
33         <body>
34                 <div id="static-1" class="static"><div id="static-1-1" class="static"><div id="static-1-1-1" class="static"></div></div></div>
35                 <div id="static-2" class="static"></div>
36                 <div id="marker"></div>
37                 <p class="instructions">Click the white box to move the marker to it. Clicking the box also changes the position to absolute (if not already) and sets the position according to the position method.</p>
38         </body>
39 </html>