title: Chaining Twitter Bootstrap modal('hide') with a delay
body: <p>I'm displaying a simple Bootstrap modal with a 'checkout' button at the bottom.</p>
  
  <p>On clicking the button I want to:</p>
  
  <ol>
  <li>Close the modal, e.g. $('#myModal').modal('hide')</li>
  <li>Wait until the animation is finished</li>
  <li>Change window.location.href to my 'checkout'
  page.</li>
  </ol>
  
  <p>I can't seem to find a way of chaining without it instantly running the next function, e.g.</p>
  
  <pre><code>$('#myModal').modal('hide').each(function() {
      window.location.href = '/checkout'; 
  });
  </code></pre>
  
  <p>or I thought delay() might help, e.g.</p>
  
  <pre><code>$('#myModal').modal('hide').delay(1000).each(function() {
      window.location.href = '/checkout'; 
  });
  </code></pre>
  
  <p>That doesn't work either it just changes page instantly.</p>
  
  <p>Is this a common jQuery issue?  Or will I have to extend Bootstrap to handle this?</p>