[jQuery] Re: why not get value using $('#wrapper').attr('offsetHeight') in firefox?

2008-01-09 Thread Shawn

offsetHeight is a DOM property.  If you really want the offsetHeight, 
you'd do it like this:

$("#wrapper")[0].offsetHeight;

But doing $("#wrapper").height() is probably the better method to use - 
more cross-browser I think.

Also, as noted in another response getElementById("Wrapper") is NOT the 
same as $("#wrapper").  JavaScript is case sensitive.  But I'm assuming 
that was just a sample for posting...

Shawn

nightelf wrote:
> in firefox
> $('#wrapper').attr('offsetHeight') == undefined
> but
> document.getElementById('Wrapper').offsetHeight
> is ok


[jQuery] Re: why not get value using $('#wrapper').attr('offsetHeight') in firefox?

2008-01-09 Thread Jonathan Sharp
Try $('#wrapper').height()

Also please note the difference in your ID's. With the jQuery code you're
referencing 'wrapper' and with the DOM methods you're referencing 'Wrapper'.

Cheers,
-Jonathan

On 1/9/08, nightelf <[EMAIL PROTECTED]> wrote:
>
>
> in firefox
> $('#wrapper').attr('offsetHeight') == undefined
> but
> document.getElementById('Wrapper').offsetHeight
> is ok
>


[jQuery] Re: why not get value using $('#wrapper').attr('offsetHeight') in firefox?

2008-01-09 Thread Sebastián V. Würtz


nightelf escribió:

in firefox
$('#wrapper').attr('offsetHeight') == undefined
but
document.getElementById('Wrapper').offsetHeight
is ok

  
the offsetHeight is an attrib? i think its a property, im not so sure 
use this

$('#wrapper').css('height');