X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Fdata%2Foffset%2Frelative.html;h=89aae83e4ae405366ccc4de6dd25a8ef6550899a;hb=ebd9205fdb7f14b98301c4c183e9d6a51420ad0e;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.