What would you do for functions that call multiple selectors, which finish at different times? For example-
Code:
$('#test').click(function() {
$('#test2').fadeIn(1000).delay(1000).fadeOut(1000);
$('#test3').delay(500).fadeOut(300);
$('#test4').animate({"top": "-150px"}, 15000);
});
How can I make it so nothing inside this function executes again, until all actions have fully completed?