title: How to access the optgroup value in bootstrapselect onChange event
body: <p>i am using a bootstrap-select item in a form and i' d like to get the optgroup value for the selected value when it gets selectet, so i can evaluate what to do based on that groups value:</p>
  
  <pre><code>$('select.selectpicker').on('change', function(e){
  
          var picker_id=e.target.id;
          var selected_value = $('.selectpicker option:selected').val();
          var optgroup = ??
  
          switch ( optgroup){
              case "group_name":
  
              break
  
          }
  });    
  </code></pre>
  
  <p>Thanks for help.</p>