How do you make animations not fire unless previous is done (withtout using callback)
<p>I have a function called:            </p>

<pre><code>this.makeStuffHappen() 
</code></pre>

<p>Which makes different animations according to a switch statement and a couple of variables. Is it possible to make a function not fire unless all previous are done resolving.</p>

<p>I want to write something like </p>

<pre><code>$('button').click(function(){
    a.makeStuffHappen();
    b.makeStuffHappen();
    c.makeStuffHappen();
    d.makeStuffHappen();
});
</code></pre>

<p>And then it should only run b after a is done, c after b is done and d after c is done. Is it only possible to make animations wait for the previous by chaining them? Is it possible to chain any function? </p>

<p>Edit: makeStuffHappen() is animating different elements so a.makeStuffHappen() will animate a different element than b.makeStuffHappen and so on.</p>

<p>Thanks.</p>
