title: Jquery - defer callback until multiple animations are complete
body: <p>I need a callback to execute once after multiple elements have finished animating.
  My jquery selector is as follows:</p>
  
  <pre><code>$('.buttons').fadeIn('fast',function() {
     // my callback
  });
  </code></pre>
  
  <p>The problem with this is that the buttons class matches a number of elements, all of which need to be faded in before the callback is executed. As it stands now, the callback is executed after each individual element has finished animating. This is NOT the desired function. I'm looking for an elegant solution such that my callback is only executed once after all the matched elements have finished animating. This question has popped up in a few places including SO, but there's never been an elegant answer (nor even a definitive answer for that matter - solutions that work for one person don't work at all for others).</p>