basic jquery looping question around 'click'
<p>Basic question, but I have been pounding my head for a bit so thought id bring it here. </p>

<p>html looks like this (edit, fixed the closing quotes) </p>

<pre><code>&lt;span class='deleteimage-119'&gt;delete&lt;/span&gt;
&lt;span class='deleteimage-120'&gt;delete&lt;/span&gt;
&lt;span class='deleteimage-121'&gt;delete&lt;/span&gt;
&lt;span class='deleteimage-122'&gt;delete&lt;/span&gt;
&lt;span class='deleteimage-123'&gt;delete&lt;/span&gt;
</code></pre>

<p>javascript/jquery looks like this</p>

<pre><code>iids = ['119','120','121','122','123'];
for (i=0; i&lt;iids.length; i++) {
        place = iids[i];
        $(".deleteimage-" + place).click(function () {
                alert(place);
             });
    }
</code></pre>

<p>The click functionality gets attached to each individual span, but the alert after clicking just shows the last item in the array.  </p>
