Moves Deferred-related code into a separate module. Context handling has been simplif...
[jquery.git] / test / data / offset / table.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>table</title>
7                 <style type="text/css" media="screen">
8                         body { margin: 1px; padding: 5px; }
9                         table { border: 2px solid #000; }
10                         th, td { border: 1px solid #000; width: 100px; height: 100px; }
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/deferred.js"></script>
15                 <script src="../../../src/support.js"></script>
16                 <script src="../../../src/sizzle/sizzle.js"></script>
17                 <script src="../../../src/sizzle-jquery.js"></script>
18                 <script src="../../../src/traversing.js"></script>
19                 <script src="../../../src/data.js"></script>
20                 <script src="../../../src/event.js"></script>
21                 <script src="../../../src/css.js"></script>
22                 <script src="../../../src/offset.js"></script>
23                 <script type="text/javascript" charset="utf-8">
24                         jQuery(function($) {
25                                 $('table, th, td').click(function() {
26                                         $('#marker').css( $(this).offset() );
27                                         return false;
28                                 });
29                         });
30                 </script>
31         </head>
32         <body>
33                 <table id="table-1">
34                         <thead>
35                                 <tr valign="top">
36                                         <th id="th-1">th-1</th>
37                                         <th id="th-2">th-2</th>
38                                         <th id="th-3">th-3</th>
39                                 </tr>
40                         </thead>
41                         <tbody>
42                                 <tr valign="top">
43                                         <td id="td-1">td-1</td>
44                                         <td id="td-2">td-2</td>
45                                         <td id="td-3">td-3</td>
46                                 </tr>
47                         </tbody>
48                 </table>
49                 <div id="marker"></div>
50                 <p class="instructions">Click the white box to move the marker to it.</p>
51         </body>
52 </html>