Hi Olivier,
The Dimensions plugin has a very powerful .offset() method. Perhaps
that is what you're looking for?
For a demo of Dimemsions methods, check out this companion page to
the Dimensions chapter in jQuery Reference Guide:
http://book.learningjquery.com/3810_10_code/dimplugin.html
--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Aug 28, 2007, at 8:39 AM, Olivier Percebois-Garve wrote:
Okay, I'm doing a lot of jQuery today so please pardon me if I'm
sending too much emails here.
I'm annoyed with the (otherwise great) dimension plugin because
there is no direct way to get the top
and left position of an element.
So all over my code I have things such as :
$errorBoxOffset = {};
element.offset({scroll: false}, $errorBoxOffset);
$left = $errorBoxOffset.left;
$top = $errorBoxOffset.top;
Have I missed something in the dimension doc ?
Do you think it would make sense to add such functions to the
dimensions plugin ?
-Olivier