Sure thing. You can get at the separate offsets (top and left) like so:

$('#my-id').offset().top;
$('#my-id').offset().left;

I hope that's what you were looking for. If not, let me know.

--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Mar 13, 2007, at 10:53 PM, rolfsf wrote:


thanks Karl - I've looked through dimensions.js

and being a newbie... I still don't understand how to use offset when I only
want one dimension (e.g. y position)

a little hint, maybe, and I'll be on my way



Karl Swedberg-2 wrote:

Hi Rolf,

By far the easiest way to do that is to use the Dimensions plugin. It
is amazingly accurate, even taking into account borders, padding,
overflow:scroll, etc.

http://docs.jquery.com/Plugins

The inline documentation is quite helpful as well.

--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Mar 13, 2007, at 8:46 PM, rolfsf wrote:


I want to find the position of the top of a div (distance from top of
window), so I can calculate and set the height of another div. How
can I get
that? I'm a little confused as to how to use offset, which returns
values
for both x and y.

Thanks!
--
View this message in context: http://www.nabble.com/finding-y-
position-tf3399556.html#a9466593
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/



--
View this message in context: http://www.nabble.com/finding-y- position-tf3399556.html#a9467686
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to