Assign a Value to a Div so I can keep track of it
<p>I am creating and appending images (divs) like this:</p>

<pre><code>$('#event_list_main').append('&lt;img class="listed_event" id="random_event" src="final_tutorial_buttons/random.png" height="50" width="50" onclick="one_band_event_action();" /&gt;');
</code></pre>

<p>so each time this is executed, an image pops up next to the previous one and so on! The problem is that I want to keep track of these! </p>

<p>I came accross this </p>

<blockquote>
  <p><a href="http://www.webdeveloper.com/forum/showthread.php?t=147935" rel="nofollow">http://www.webdeveloper.com/forum/showthread.php?t=147935</a></p>
</blockquote>

<p>but I don't know how to implement it. Another thing I thought of is, to pass a reference number (something like a counter) in "append()"
like this:</p>

<pre><code>$('#event_list_main').append('&lt;img class="listed_event" id="random_event &lt;INSERT REFERENCE&gt;" src="final_tutorial_buttons/random.png" height="50" width="50" onclick="one_band_event_action();" /&gt;');
</code></pre>

<p>but how can I pass it? is there an escape symbol?</p>
