Using .attr() with .get() Issues
<p>I am trying to store an array of objects in an array by going through each paragraph element in a <code>div</code> container with the .<code>get()</code> method.  I try to access the attribute with .<code>attr()</code> but it doesn't seem to work.  How would I modify this code in order to be able to access the 'id' attribute of each message?</p>

<pre><code>        var messages = $("#message_container p").get();
        var idstest = [];

        for (int i = 0; i &lt; messages.length; i++){
            idstest.push(messages[i].attr("id"));
        }
</code></pre>

<p>I think it has to do with some fundamental incompatibility with .<code>get()</code> and .<code>attr()</code>.  When I 'alert' the objects provided by .<code>get()</code> I get <code>[object HTML---]</code>.  I'm assuming that is not the form necessary in order to use .<code>attr</code>?</p>
