title: Understanding jQuery effects queueing
body: <p>I'm trying to have one jQuery effect/animation run after another.  I've tried this:</p>
  
  <pre><code>$('#myDiv').animate({'left':'+=300'},1000).delay(2000).animate({'left':'-=300'},1000);
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>This actually does work- just a pasting mistake on my part.  Chaining effects automatically creates a queue, according to the <a href="http://api.jquery.com/queue/" rel="nofollow">docs</a>, which is what we want:</p>
  
  <blockquote>
    <p><code>$('#foo').slideUp().fadeIn();</code> </p>
    
    <p>When this statement is executed, the
    element begins its sliding animation
    immediately, but the fading transition
    is placed on the fx queue to be called
    only once the sliding transition is
    complete.</p>
  </blockquote>
  
  <p>(Thanks for the help, won't let me delete the question)</p>