Why are all the iterations run at the same time?
<p>Here's the <a href="http://jsfiddle.net/JaQmd/">jsfiddle</a> simulating my problem relating to this code:</p>

<pre><code>$('#button').click(function(){
   var i;
   for (i = 1; i &lt; 4; ++i) {
      $('#img' + i).fadeIn("slow").delay(1000);
      $('#img' + i).fadeOut("slow");
   }
});
</code></pre>

<p>I was expecting the <code>#img1</code> element to fade in and then for the execution to stop for 1 second and then fade out, then start over for the <code>#img2</code> element etc.</p>
