Help with debugging JQuery Fade Script
<p>For one of my first ventures into JQuery, I have the very simple goal of stepping through the children of a div and fading them in and out one by one.  For some reason though, if I manually define an index for <code>nth-child</code>, say 1, then the first child fades in and out four times.  If I use the variable "i", however, then all of the children fade in and out four times.  Why is this happening?</p>

<p>Here is my code:</p>

<pre><code>&lt;div id="slideshow"&gt;
    &lt;p&gt;Text1&lt;/p&gt;
    &lt;p&gt;Text2&lt;/p&gt;
    &lt;p&gt;Test3&lt;/p&gt;
    &lt;p&gt;Text4&lt;/p&gt;
&lt;/div&gt;

&lt;script&gt;
$(document).ready(function() {
        var $elements = $('#slideshow').children();
        var len = $elements.length;
        var i = 1;
        for (i=1;i&lt;=len;i++)
        {
            $("#slideshow p:nth-child(i)").fadeIn("slow").delay(800).fadeOut("slow");
        }
});
&lt;/script&gt;
</code></pre>

<p>Each of the paragraphs is set to <code>display: none;</code> initially.</p>
