Skip to content

Commit 4fc2971

Browse files
committed
Added visual marker to absolute fixture for offset testing
1 parent e317bb7 commit 4fc2971

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

test/data/offset/absolute.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,22 @@
66
<title>absolute</title>
77
<style type="text/css" media="screen">
88
body { margin: 1px; padding: 5px; }
9-
div.absolute { position: absolute; margin: 1px; border: 2px solid #000; padding: 5px; width: 100px; height: 100px; }
9+
div.absolute { position: absolute; margin: 1px; border: 2px solid #000; padding: 5px; width: 100px; height: 100px; background: #fff; }
1010
#absolute-1 { top: 0; left: 0; }
1111
#absolute-1-1 { top: 1px; left: 1px; }
1212
#absolute-1-1-1 { top: 1px; left: 1px; }
1313
#absolute-2 { top: 19px; left: 19px; }
14+
#marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
1415
</style>
1516
<script type="text/javascript" src="../../../dist/jquery.js"></script>
16-
<script type="text/javascript" charset="utf-8"> $(function() { return; }); </script>
17+
<script type="text/javascript" charset="utf-8">
18+
$(function() {
19+
$('.absolute').click(function() {
20+
$('#marker').css( $(this).offset() );
21+
return false;
22+
});
23+
});
24+
</script>
1725
</head>
1826
<body>
1927
<div id="absolute-1" class="absolute">absolute-1
@@ -22,5 +30,6 @@
2230
</div>
2331
</div>
2432
<div id="absolute-2" class="absolute">absolute-2</div>
33+
<div id="marker"></div>
2534
</body>
2635
</html>

0 commit comments

Comments
 (0)