Consider the following scenario:
element.css({display:'none'}); element.slideDown(1000);
What is the correct way to get the final animation value up to . If I immediately access the css properties, I get the current values. I have simplified the above case. The actual code is not bound in the same function, so I cannot just create a variable to hold this value for me later.
Thanks in advance.
EDIT:
I think that I could not express well what I am trying to do. My question is revised:
element.css({display:'none'}); element.slideDown(1000); btn.click(function() { var finalHeight = element..? var str = 'height of the element will be ' + finalHeight; str += ' when the animation is complete'; alert(str); }
Consider clicking this button before completing the animation.
jquery css animation
inhan
source share