I want to animate a div from top down. I think the idea is animate the height from 0 to its rendered width.
But before it is shown I don’t know the rendered width, how to write the code to animate this?
It’s like: $.animate({"width":"auto"})
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to grab the width using
.width()like so: