I've a list of collapsible items with a minimum height of 75px. Anything exceeding 75px is hidden using "overflow:hidden". Each item may have different actual heights depending on its content. Is there a way i can get the actual height of each item using jquery, even though i've limited its height to 75px using css. Using .height() returns 75px and not the actual height of the element.
Here's the html:
<li class="parent">
<input type="button" id="expand" />
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</li>
Only the first 2 spans are shown initially. And here's the jquery (attached to button click event)
$("#expand").parent().animate({'height':??},1000);
I need to dynamically replace the ?? with the actual height of the list element so it expands to its full height upon clicking the button.
Any help will be appreciated.
Cheers, Kartik Rao