title: Bootstrap 3 - Select all options using multiple select
body: <p>I have the following multiple select field from Bootstrap 3 framework:</p>
  
  <pre><code>&lt;select class="selectpicker" multiple name="regions" id="regions"&gt;
      &lt;option value="99"&gt;All regions&lt;/option&gt;
      &lt;option value="AC"&gt;AC&lt;/option&gt;
      &lt;option value="AL"&gt;AL&lt;/option&gt;
      &lt;option value="AP"&gt;AP&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>And its jQuery code:</p>
  
  <pre><code>$("#regions").change(function(){
      if($("option:selected:last",this).val() == 99){
          $('#regions option').prop('selected', true);
      } else{
          $('#regions option').prop('selected', false);
      }
  });
  </code></pre>
  
  <p>The issue is: when the "All regions" option is selected, the multiple select is not updated with all the options selected.</p>