jquery delay() function
<p>I have 5 divs in my page. Father div "container" includes four child div. I want to use easing plugin to show each page by sequence. At the end set them back to "top : -200px". Then put all of them into setInterval() as a infinite loop. But this doesn't work. Could someone tell me why? Thanks!</p>

<pre><code>&lt;div id="banner"&gt;
    &lt;div id="div1"&gt;&lt;/div&gt;
    &lt;div id="div2"&gt;&lt;/div&gt;
    &lt;div id="div3"&gt;&lt;/div&gt;
    &lt;div id="div4"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;style&gt;
#banner{
position: relative;
width: 600px;
height: 200px;
overflow: hidden;
}
#div1{
width:600px;
height:200px;
background-color: #fc3;
position: absolute;
top: -200px;
}
#div2{
width:600px;
height:200px;
background-color: #cc3;
position: absolute;
top: -200px;
}
#div3{
width:600px;
height:200px;
background-color: #cf3;
position: absolute;
top: -200px;
}
#div4{
width:600px;
height:200px;
background-color: #ff3;
position: absolute;
top: -200px;
}
&lt;/style&gt;
&lt;script src="jquery.js"&gt;&lt;/script&gt;
&lt;script src="jquery.easing.1.3.js"&gt;&lt;/script&gt;
&lt;script&gt;
$(document).ready(function(){
    setInterval(function(){
        $("#div1").animate(
            { top: 0 }, {
                duration: "slow",
                easing: "easeOutElastic"
            });
        $("#div2").delay(2000).animate(
            { top: 0 }, {
                duration: "slow",
                easing: "easeOutElastic"
            });
        $("#div3").delay(4000).animate(
            { top: 0 }, {
                duration: "slow",
                easing: "easeOutElastic"
            });
        $("#div4").delay(6000).animate(
            { top: 0 }, {
                duration: "slow",
                easing: "easeOutElastic"
            });
        $("#div1").delay(8000, function(){
            $(this).css("top", "-200px");
        });
        $("#div2").delay(8000, function(){
            $(this).css("top", "-200px");
        });
        $("#div3").delay(8000, function(){
            $(this).css("top", "-200px");
        });
        $("#div4").delay(8000, function(){
            $(this).css("top", "-200px");
        });
        }, 0);  
});
&lt;/script&gt;
</code></pre>
