title: How to get the optgroup for a multiselect in jQuery?
body: <p>I am using a multiselect with options grouped together.</p>
  
  <pre><code>&lt;select title="Fruits" multiple="multiple" id="fruits" name="fruits[]"&gt;
      &lt;option selected="selected" label="All" value=""&gt;All&lt;/option&gt;
      &lt;optgroup label="" class="fruit"&gt;
          &lt;option label="apple" value="1"&gt;Apple&lt;/option&gt;
          &lt;option label="pear" value="2"&gt;Pear&lt;/option&gt;
          &lt;option label="orange" value="3"&gt;Orange&lt;/option&gt;
      &lt;/optgroup&gt;
      &lt;optgroup label="" class="berries"&gt;
          &lt;option label="strawberry" value="4"&gt;Strawberry&lt;/option&gt;
          &lt;option label="raspberry" value="5"&gt;Raspberry&lt;/option&gt;
          &lt;option label="blueberry" value="6"&gt;Blueberry&lt;/option&gt;
      &lt;/optgroup&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I've tried <code>$(this).find("option:selected").parent().attr("label")</code> which only returns the optgroup of the first selected option, meaning if Strawberry and Pear were both selected, optgroup '.fruit' would be returned on both accounts.</p>
  
  <p>Using jQuery, how do I get the optgroup of each selected option?</p>