X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=test%2Fdata%2Foffset%2Frelative.html;h=89aae83e4ae405366ccc4de6dd25a8ef6550899a;hb=5c21e44fce5335cfe1bb4989006900476f2c75ca;hp=8a2aa939419766394a6e1e37f0fd27d1625eee94;hpb=c424e79ccb3695c6ff599e77bec867c6644ccc98;p=jquery.git diff --git a/test/data/offset/relative.html b/test/data/offset/relative.html index 8a2aa93..89aae83 100644 --- a/test/data/offset/relative.html +++ b/test/data/offset/relative.html @@ -15,6 +15,8 @@ $(function() { $('.relative').click(function() { $('#marker').css( $(this).offset() ); + var pos = $(this).position(); + $(this).css({ position: 'absolute', top: pos.top, left: pos.left }); return false; }); }); @@ -24,5 +26,6 @@
+

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.

\ No newline at end of file