Get values from from multiple select[multiple] with the same class
<p>I'm trying to get the values of selected options from a couple of different <code>&lt;select multiple='multiple'&gt;</code> on my page. These picklists have the same class(food) so I would like to use that in order to reference them all. This is my code so far.</p>

<pre><code>var checkedVals = $('.food :selected').map(function() {
    return this.value;
}).get();
</code></pre>

<p>And here is what one of my selects looks like all rendered out.</p>

<pre><code>&lt;select multiple="multiple" id="id_form-0-foods" class="food" name="form-0-foods"&gt;
&lt;option value="1"&gt;meat&lt;/option&gt;
&lt;option value="2"&gt;fish&lt;/option&gt;
&lt;option value="3"&gt;bread&lt;/option&gt;
&lt;option value="4"&gt;cheese&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>EDIT: more details below.</p>

<p>The above jquery snippet is wrapped in this:</p>

<pre><code>$("option").live('dblclick', function () {

});
</code></pre>

<p>Also, im using django formsets and <a href="http://chase-seibert.github.io/blog/2010/05/14/reuse-djangos-filter_horizontal-admin-widget.html" rel="nofollow">http://chase-seibert.github.io/blog/2010/05/14/reuse-djangos-filter_horizontal-admin-widget.html</a></p>

<p>NEW EDIT: The issue was that the Django admin widget that I was using sets the options to selected in "view source" but when I inspected individual elements, there was no such thing going on in the code. I was getting empty lists and this was what was supposed to happen.</p>
