title: jQuery to multi-select all values if first option is selected
body: <p>If the first option 'All' is selected then i want to ensure all remaining options are checked. If the first option 'All' is unchecked then i want to ensure all remaining options are unchecked.</p>
  
  <p>It seems to be selecting the values, but does not check the options on the front end.</p>
  
  <p>Codeply example given: <a href="https://www.codeply.com/go/ExFJtHShnF" rel="nofollow noreferrer">https://www.codeply.com/go/ExFJtHShnF</a></p>
  
  <p>Jquery code I have written - not working as it should</p>
  
  <pre><code>$("#basic").change(function () {   
      if ( $("#basic option:first").prop('selected') ) {
          $('#basic option').prop('selected', true);
      }
  });
  </code></pre>