Question

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.

Was it helpful?

Solution

Use the .height() method instead:

var heightOfDiv = $thisElement.height();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top