emilolsson emilolsson - 7 months ago 61
jQuery Question

How do I get the real .height() of a overflow: hidden or overflow: scroll div?

I have a question regarding how to get a div height. I'm aware of

, but none of them does the job for me in this case. The thing is that in this case I have a div that is overflown width a overflow: scroll and the div has a fixed height.

If I use
, both of them gives me the height of the visible area, but if I want the overflown taken in to account, how do I go about?


Use the .scrollHeight property of the DOM node: $('#your_div')[0].scrollHeight