Karl-
I appreciate the reply, I am just getting back to this now.
I had used the height method, but it is not the same number as
offsetHeight. So I need to also get offset().top and add on the
height to find the vertical position of the bottom of an element in
the viewport. I believe offsetHeight gives you that number straight
up. But no big deal I can do it that way now that I understand how
jQuery hands out the positional information for an element.
Thanks again for the feedback. --MERC.
On Oct 9, 9:56 am, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Hi Merc,
>
> If you want an integer, try this:
>
> var headerElem = $("#header");
> var headerHeight = headerElem.height();
>
> If you want the value with "px", try this:
>
> var headerElem = $("#header");
> var headerHeight = headerElem.css('height');
>
> Hope that helps.
>
> --Karl
> _________________
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Oct 9, 2007, at 1:02 AM, Merc70 wrote:
>
>
>
> > I'm new to Javascript and jQuery, so I'm sorry if this is basic
> > stuff. How do I access offsetHeight for an element? This is what I
> > have, but offsetHeight comes up undefined:
>
> > var headerElem = $("#header");
> > var headerHeight = headerElem.offsetHeight;
>
> > whereas this works:
> > var docHeader = document.getElementById("header");
> > headerHeight = docHeader.offsetHeight;
>
> > Thanks --MERC