views:

257

answers:

2
var heightOfDIV = $thisElement.css('height');
alert(heightOfDIV);

The above works as I expected it to work when I am using Firefox.

It returns me the div element that triggers the above code. I get the height as 393px.

however in IE7, i get auto.

This is causing me issues.

By the way, the above code is run in the afterExpand($thisElement) function of the expander jquery plugin.

Can anyone help me so that i can get the same result in IE7 as in Firefox?

Thank you.

+2  A: 

Use the .height() method instead:

var heightOfDiv = $thisElement.height();
Greg
thanks greg. i am a newbie to this stuff.
keisimone
A: 

Thanks Greg!!

The .height() works. :)

Muhammad.

Muhammad Tanweer