jQuery issue: how to use setInerval function to implement a infinite loop
<p>How to implement following function by setInterval() in jQuery?  </p>

<pre><code>function1(){
  $("#img1").show();
  $("#img02").delay(1000).show();
  $("#img03").delay(2000).show();
  $("#img04").delay(3000).show();
  $("#img01").delay(4000).hide();
  $("#img02").delay(4000).hide();
  $("#img03").delay(4000).hide();
  $("#img04").delay(4000).hide();
}
$(function(){
  setInterval("function1()", 2000);
});
</code></pre>

<p>I want to show images one by one and hide them all and do it again and again.<br>
But the code won't do what I want, images displayed not by order. Could someone tell me why?</p>
