Callback to .delay()
<p>I have an <code>$image</code> that I <code>.fadeIn</code> and <code>.fadeOut</code>, and then <code>.remove</code> after <code>.fadeOut</code> completes. This is my code:</p>

<pre><code>$image
   .fadeIn()
   .fadeOut(function() {
      $(this).remove();
   });
</code></pre>

<p>I want to add a <code>.delay</code> after <code>.fadeOut</code>, and <code>.remove</code> the <code>$image</code> only once <code>.delay</code> has completed. I have tried:</p>

<pre><code>$image
   .fadeIn()
   .fadeOut()
   .delay(1000, function() {
      $(this).remove();
   });
</code></pre>

<p>The problem is that <code>.delay</code> doest <em>not</em> accept a callback function. How can I <code>.remove</code> the picture as a callback to <code>.delay</code>?</p>
