You can add a callback function to the one that does the animation as soon as the animation finishes the callback you call so that you can do what you want.
Below is an example from jquery docs:
$('#clickme').click(function() { $('#book').animate({ opacity: 0.25, left: '+=50', height: 'toggle' }, 5000, function() {
PS: Morning? It's almost midnight, D
source share