Far out! jQuery rules! Thanks a lot!
You can pull the element out of it's container and append it to the body.
$('#myOtherDiv').appendTo('body').css(offset);
--
Brandon Aaron
On 5/16/07, Skilip <[EMAIL PROTECTED]> wrote:
Alright, but that's the absolute position relative to it's container's
position. Is it not possible to place
Alright, but that's the absolute position relative to it's container's
position. Is it not possible to place it (like offset.top) relatively
to the browsers canvas?
The offset method returns an object with a top and left property.
$('#myDiv').offset() => { top: 100, left: 100 }
Since the .css() method can take an object you can just pass the
result of .offset() directly to .css().
var offset = $('#myDiv').offset();
$('#myOtherDiv').css( offset );
You cou
4 matches
Mail list logo