How can I animate multiple elements sequentially using jQuery?
Posted
by lorenzium
on Stack Overflow
See other posts from Stack Overflow
or by lorenzium
Published on 2009-08-02T04:28:27Z
Indexed on
2010/04/30
19:07 UTC
Read the original article
Hit count: 181
I thought it would be simple but I still can't get it to work. By clicking one button, I want several animations to happen - one after the other - but now all the animations are happening at once. Here's my code - can someone please tell me where I'm going wrong?:
$(".button").click(function(){
$("#header").animate({top: "-50"}, "slow")
$("#something").animate({height: "hide"}, "slow")
$("ul#menu").animate({top: "20", left: "0"}, "slow")
$(".trigger").animate({height: "show", top: "110", left: "0"}, "slow");
});
© Stack Overflow or respective owner