[jQuery] Re: Set the position of an element using the dimensions plugin

2007-05-16 Thread Skilip
Far out! jQuery rules! Thanks a lot!

[jQuery] Re: Set the position of an element using the dimensions plugin

2007-05-16 Thread Brandon Aaron
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

[jQuery] Re: Set the position of an element using the dimensions plugin

2007-05-16 Thread Skilip
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?

[jQuery] Re: Set the position of an element using the dimensions plugin

2007-05-16 Thread Brandon Aaron
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