I want to push down (show) this DIV, which has an initial height 0px:
<div id="toslide" style="height:0px;overflow:hidden;"> ... various content </div>
However, the final height is unknown due to different screen widths, font sizes and other materials that affect the internal layout and, therefore, the height of the target.
If I need to do this manually, I will show it with visibility:hidden;, measure the height, and then animateto a known height (this also has drawbacks).
I have mixed results with jQuery .slideDown()- in the documentation in which it works, but in this particular case it does not work.
How can jQuery know the final height?
Edit: One workaround is to have another inner div with height:auto;which will be used to measure height.
source
share