title: Jquery get label of OPTGROUP of select option
body: <p>I am trying to find the value of the optgroup label of currently selected option in a select control. below is some html to show what im trying to do.</p>
  
  <pre><code>&lt;select id='sector_select' name='sector_select' data-placeholder="Select Sector..." style="width:200px;" class="chzn-select"&gt;    
      &lt;option value='' selected='selected'&gt;All Sectors&lt;/a&gt;
      &lt;optgroup label="Consultancy Services"&gt;
          &lt;option value='Employment placement/ recruitment'&gt;Employment placement/ recruitment&lt;/option&gt;
      &lt;/optgroup&gt;
      &lt;optgroup label="Supplies"&gt;
          &lt;option value='Food, beverages and related products'&gt;Food, beverages and related products&lt;/option&gt;
      &lt;/optgroup&gt;                
   &lt;/select&gt;
  &lt;script type="text/javascript"&gt;
  $('#sector_select').change(function ()
  {
      var label=$('sector_select :selected').parent().attr('label');
      console.log(label);
  });    
  &lt;/script&gt;
  </code></pre>
  
  <p>the above code gives undefined because its reading parent of select element other than option. any ideas?</p>