new offset method, faster and no more browser detection
[jquery.git] / test / data / offset / body.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>body</title>
7                 <style type="text/css" media="screen">
8                         body { margin: 1px; padding: 5px; }
9                         #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
10                 </style>
11                 <script type="text/javascript" src="../../../dist/jquery.js"></script>
12                 <script type="text/javascript" charset="utf-8">
13                         $(function() {
14                                 $('body').click(function() {
15                                         $('#marker').css( $(this).offset() );
16                                         return false;
17                                 });
18                         });
19                 </script>
20         </head>
21         <body>
22                 <div id="marker"></div>
23         </body>
24 </html>