Iterate and process child elements with jquery - proper use of $(this)
<p>I'm trying to get jquery to find pairs of elements, take the value of one, process it and make it the value of the next one, rinse and repeat.</p>

<pre><code>        $(function() {

                $("div").each(function() {
                var longURL = $(this).attr("href");
                $(this).html("processed "+longURL);
                });

        });

    &lt;div class="long" href="plop"&gt;&lt;/div&gt;
    &lt;div class="short" href="plip"&gt;&lt;/div&gt;
    &lt;div class="long" href="plopouze"&gt;&lt;/div&gt;
</code></pre>

<p>output is :</p>

<pre><code>processed plop
processed plip
processed plopouze
</code></pre>

<p>So this works, since it selects all the divs, somehow proving that each() can handle multiple objects ; But I fail to understand how to properly select back those <code>$(this)</code> objects using a class selector, something like <code>$(this).(.myclass)</code> (in this case <code>$(this).('.short')</code>) does not work..?</p>
