title: Select2 onselect an option will select all other option
body: <p>I have a select 2 provided in this <a href="https://jsfiddle.net/kLw8rnre/2/" rel="noreferrer">JSFIDDLE</a>. How can I onselect an option call <code>All</code> it will select all of the option inside that select field except for itself, meaning the <code>All</code> option is more like a Select All button. and deselecting the <code>All</code>. will deselect all option. I provide the same code from the jsfiddle below :</p>
  
  <p>HTML :</p>
  
  <pre><code>&lt;select class="parent_filter_select2 pull-right" id="parent_filter_select2" multiple="multiple" name="select_project" style="width: 300px;"&gt;
  &lt;option value="all"&gt;All&lt;/option&gt;
          &lt;option value="Option A"&gt;Option A&lt;/option&gt;
          &lt;option value="Option B"&gt;Option B&lt;/option&gt;
          &lt;option value="Option C"&gt;Option C&lt;/option&gt;
          &lt;option value="Option D"&gt;Option D&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Javascript : </p>
  
  <pre><code>$('#parent_filter_select2').select2({
      placeholder: 'Select'
  });
  </code></pre>
  
  <p>Any help is much appreciated, thanks.</p>
  
  <p><strong>UPDATE :</strong>  I found something similar like I've wanted but its using checkbox instead so Im figuring how to implement it on the <code>All</code> option instead of a checkbox, and also with this its selecting the <code>All</code> option too, code below :</p>
  
  <pre><code>$("#checkbox").click(function(){
        if($("#checkbox").is(':checked') ){ //select all
          $("#parent_filter_select2").find('option').prop("selected",true);
          $("#parent_filter_select2").trigger('change');
        } else { //deselect all
          $("#parent_filter_select2").find('option').prop("selected",false);
          $("#parent_filter_select2").trigger('change');
        }
    });
  </code></pre>