how can i disable an optgroup on change in jquery bootstrap multiselect
<p>I have two multiselect boxes,
On change of the first select box I want to disable some groups of the second select box.</p>

<p>I am using the following code onChange function of the multiselect plugin</p>

<pre><code>    $('optgroup[label=MyGroup2]').prop('disabled', true); 
</code></pre>

<p>I dont understand why it is not working, how can I implement it..</p>