Visible div height

Visible div height

I have a div with several elements in it being hidden (display:none). I need to get the height of this div, but only of what's visible. $("#myDiv").height() returns the total height of the div, including the height of all the hidden elements inside it.

Can someone help me?