I'd like to get the height of an element, if said element was currently set to height:auto;
, without actually setting the elements height to auto.
Pretty straight forward, but I can't figure out how to obtain the auto height value without first setting the element's height to auto. That's the part I'm trying to avoid.
Anyone know how I would do this?
This jsfiddle will demonstrate my issue.
I'm trying to set all three headings to the same height. When resize the window I need the heights to adjust. With the current script the height is first set to auto, which causes the height to jump around a bit. I'm trying to avoid this jump.
I'll try to clarify the jump I'm referring to - When you resize the window, if the heading heights change, the animation to the new height will start. However the animation always resets to it's 'auto' height before the animation starts.
So for example:
- Auto height = 20px
- On resize all elements animate from auto height (20px) to new height (ie - 40px)
- If resized again all elements reset to auto height (20px) THEN animate to another new height (ie - 60px)
So if you consider step 2 to 3, my goal is to have the animation start from the current height (40px) and proceed to the new height (60px), instead of resetting to the auto height (20px) before animating to the new height (60px).
Hopefully this helps even further...