I have this little animation activated by a link ($control1). When you click on that button the header goes down and the .area2 div show with a fadeIn effect.
Is there a way to wait until the header goes down and then show the .area2 with the fadeIn effect? With this code both animations run at the same time.
$(document).ready(function(){ $("#control1").toggle( function() { $("#header").animate({top:0}, 250); $(".area2").fadeIn(550);}, function() { $("#header").animate({top:-82}, 250);$(".area2").fadeOut(550);} ); });