how can i animate a div through out screen with single click with jquery
Share
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.
I’m assuming that you want to move the DIV around the screen from one position to another. The way to do this would be to chain several animate() calls moving it from one position to another as the previous move completes. Perhaps store the intermediate positions, if you have them, in an array and pop off the next position for each animate call until all the calls are completed. Using a recursive callback function would probably be the best way to handle this.
I’ll assume that the DIV is already absolutely positioned. If not, you might want to have a look at the makeAbsolute plugin.
untested