How do I store data in array within a loop jQuery
<p>How do I store data in array within a loop?</p>

<pre><code>    var images;
    var i = 0;

    $('#cover div').each(function()
    {
        alert($(this).attr('id'));
        //I should store id in an array
    });


    &lt;div id="cover"&gt;
        &lt;div id="slider_1"&gt;&lt;p class="content"&gt;SLIDER ONE&lt;/p&gt;&lt;/div&gt;
        &lt;div id="slider_2"&gt;&lt;p class="content"&gt;SLIDER TWO&lt;/p&gt;&lt;/div&gt;
        &lt;div id="slider_3"&gt;&lt;p class="content"&gt;SLIDER THREE&lt;/p&gt;&lt;/div&gt;
    &lt;/div&gt;
</code></pre>
