X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Fdata%2Foffset%2Frelative.html;h=89aae83e4ae405366ccc4de6dd25a8ef6550899a;hb=6b938e1c162877ee62681f8aefe6f64ba208eead;hp=dc78976b9b722cc8bd8748a118f0010ac5d201ab;hpb=f576ceeea9eea5fec6b31172765df4da8b264ac8;p=jquery.git diff --git a/test/data/offset/relative.html b/test/data/offset/relative.html index dc78976..89aae83 100644 --- a/test/data/offset/relative.html +++ b/test/data/offset/relative.html @@ -15,18 +15,17 @@ $(function() { $('.relative').click(function() { $('#marker').css( $(this).offset() ); + var pos = $(this).position(); + $(this).css({ position: 'absolute', top: pos.top, left: pos.left }); return false; }); });
-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.