Javascript arrayList with images
<p>I am storing image tags in an ArrayList but my code doesn't work and it is pretty simple, dunno why.</p>

<pre><code>var total_Events = [];

    var img =
         $('&lt;img&gt;', {
            'title': 'Title_1 (Event '+wavy_counter+')',
            'class': 'listed_event',
            'id': 'wavy_event_'+wavy_counter+'',
            'data-count': ''+wavy_counter+'',
            'src': 'final_buttons/test.png', 
            'height': '50', 
            'width': '50', 
            'onclick': 'highlight.call(this);', 
            'data-start': '', 
            'data-end': ''
        });

    img.appendTo('#event_list_main');

    //Storing Event
    store_event(img);
</code></pre>

<p>and the store_event function:</p>

<pre><code>function store_event(event)
{
    total_Events.push(event);

};
</code></pre>

<p>When I print the array I get nothing.</p>

<p>EDIT: Print Code</p>

<pre><code>$('#test').click(function()
{
    for(var i=0;i&lt;total_Events.length;i++){
        document.write(total_Events[i]);
    }
});
</code></pre>
