jQuery's implicit loop goes "both ways"?
<p>Turns out jQuery's "implicit looping" goes both way:</p>

<pre><code>    &lt;div class="classOne"&gt;
        some content
    &lt;/div&gt;

    &lt;div class="classOne"&gt;
        some content 2
    &lt;/div&gt;  

[...]

$(function() { $('hello world').prependTo($('.classOne')); })
</code></pre>

<p>in this case, the loop will happen at the <code>$('.classOne')</code> section -- <code>hello world</code> will be added to both Divs.</p>

<p>I also tried</p>

<pre><code>    &lt;div class="classOne"&gt;
        some content
    &lt;/div&gt;

    &lt;div class="classOne"&gt;
        some content 2
    &lt;/div&gt;  

    &lt;div class="classTwo"&gt;
        &lt;a href="http://www.google.com"&gt;hello Google&lt;/a&gt;
    &lt;/div&gt;

    &lt;div class="classTwo"&gt;
        &lt;a href="http://www.yahoo.com"&gt;hello Yahoo&lt;/a&gt;
    &lt;/div&gt;  

[...]

$(function() { $('.classTwo').prependTo($('.classOne')); })
</code></pre>

<p>and there will be "nested loops"... so the 2 links will be added to both Divs</p>

<p>so i think if we have</p>

<pre><code>$('.classOne').prepend($('.classTwo')).prepend($('.classThree'))
</code></pre>

<p>then it will be like 3 nested loops?  Is there a rule to the nesting, and which one is the inner loop and which one is the outer loop?  And what is the inner loop / outer loop if it is</p>

<pre><code>$('.classOne').prependTo($('.classTwo')).prependTo($('.classThree'))
</code></pre>

<p>?</p>
