jquery each does not loop through all elements?
<p>EDIT: this code works fine, overlooked that the divs were stacked on top of eachother, fooled by visual feedback :( excuse me.</p>

<p>I have been searching the each questions here on stackOverflow and reading the jquery doc but I cant find out why this snippet is only placing "bar" in one of the divs. What am I missing here? All examples seem to work this way:</p>

<pre><code>&lt;div class="foo"&gt;&lt;/div&gt;
&lt;div class="foo"&gt;&lt;/div&gt;

$(".foo").each(
  function() {
    $(this).append("bar");
  }
);
</code></pre>

<p>I select all foo class elements, iterate over them with each, in the each function this is the current element right? Seems not though... what am I doing wrong?</p>

<p>I also tried: </p>

<p><code>function(index, element) {$(element)</code> etc. same results.</p>
