title: set option B selected on selecting option A in JQuery multi-select
body: <p>I had requirement like when u select option A automatically select option B, i searched for function to select a particular option but i did not found any, finally i wrote i think its helpful.</p>
  
  <pre><code>&lt;select id="multiselectid" multiple&gt;
      &lt;option value='optionA'&gt;Option A&lt;/option&gt;
      &lt;option value='optionB'&gt;Option B&lt;/option&gt;
      &lt;option value='optionC'&gt;Option C&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>here is jquery code snippet.</p>
  
  <pre><code>$("#multiselectid").multiselect("widget").find(":checkbox").change(function () {
      if ($(this).val() == 'OptionA' &amp;&amp; $(this).is(":checked")) {
          selectOptionB();
      }
  });
  
  function selectOptionB() {
      $("#multiselectid").multiselect("widget").find(":checkbox").each(function () {
          if ($(this).val() == 'OptionB' &amp;&amp; !$(this).is(":checked")) {
              this.click();
          }
      });
  }
  </code></pre>