Well I have a AJAX calls being performed while I animate some content.
I want to fire a callback after both are finished successfully?
Any idea?
EDIT: fix typos in the title
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.
This sounds like a good candidate for jQuery Deferred
Here’s some rough code on how it would work.
Some references:
http://api.jquery.com/promise/
http://www.erichynds.com/jquery/using-deferreds-in-jquery/
As per some comments i checked to make sure both animation and ajax calls execute in parallel and as expected, they do. http://jsfiddle.net/Gdqfp/4/