[jQuery] Position.clone in jquery

2006-12-19 Thread Andreas Wahlin
I've recently moved from prototype to jquery, and wonder if there's  
something simmilar to Position.clone. That is, match an arbitrary  
elements position exactly, (with all the offsets and parents and so  
on, it's more to it than just match top and left attributes)
I googled a bit and came up with a test case on the jquery side for  
the prototype code, which I found somewhat interesting.

Andreas

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Position.clone in jquery

2006-12-19 Thread Paul Bakaus

Hi Andreas,

yes there is something quite similar, if not even better working thing: It's
the additional function offset() in the dimensions.js plugin, which you can
get via SVN in the plugins directory.
Just pick the element you want and do $(myelement).offset(), and you'll get
a nice object that contains left/top. Try it!

-Paul

2006/12/19, Andreas Wahlin [EMAIL PROTECTED]:


I've recently moved from prototype to jquery, and wonder if there's
something simmilar to Position.clone. That is, match an arbitrary
elements position exactly, (with all the offsets and parents and so
on, it's more to it than just match top and left attributes)
I googled a bit and came up with a test case on the jquery side for
the prototype code, which I found somewhat interesting.

Andreas

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
Paul Bakaus
Web Developer

Hildastr. 35
79102 Freiburg
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Position.clone in jquery

2006-12-19 Thread Andreas Wahlin
Sweet! Thank you, works completely as advertised (once I remember to  
show the element I actually want to look at hehe)


Andreas


On Dec 19, 2006, at 11:30 , Paul Bakaus wrote:


Hi Andreas,

yes there is something quite similar, if not even better working  
thing: It's the additional function offset() in the dimensions.js  
plugin, which you can get via SVN in the plugins directory.
Just pick the element you want and do $(myelement).offset(), and  
you'll get a nice object that contains left/top. Try it!


-Paul

2006/12/19, Andreas Wahlin [EMAIL PROTECTED]:
I've recently moved from prototype to jquery, and wonder if there's
something simmilar to Position.clone. That is, match an arbitrary
elements position exactly, (with all the offsets and parents and so
on, it's more to it than just match top and left attributes)
I googled a bit and came up with a test case on the jquery side for
the prototype code, which I found somewhat interesting.

Andreas

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



--
Paul Bakaus
Web Developer

Hildastr. 35
79102 Freiburg
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/