Does jquery animate method have a onStart callback. I know about the complete callback but don’t see anywhere to use other callbacks like onStart or initialize .
I want onStart callback because when I am calling animate(), it may not start immediately but queued due to previous animation not finished.
Once you call the animate method, it will run while your other javascript code is running. So the equivalent of having an onStart callback would be putting the code you want to run immediately after the animate method. Additionally, there is a ‘step’ function you can use.. http://api.jquery.com/animate/#step .. I haven’t used it, but it seems like you can check for the initial CSS values you’re working with and only execute code based on that. Could be a performance issue though if you’re animating a lot of parts.