Fred Janon wrote:
Hi,
I am trying to understand how the height of an element is calculated in jQuery. I don't understand how the height can be calculated especially when the element is hidden with display:none. Thanks Fred

Fred,

if the particular element is hidden, it is absolutely positioned while invisible (and the parent element its context), instead of "display: none", and the height can then be calculated. Thereafter these styles are resetted.

There is one issue: If not the element itself but some parent element is hidden via setting display to none, you won't get the correct height. Its just to expensive to use the above described technique for some parent element.



--Klaus

Reply via email to