Skip to content

Instantly share code, notes, and snippets.

@mrroot5
Created March 20, 2015 15:45
Show Gist options
  • Select an option

  • Save mrroot5/b109ea81d13c12bf96a8 to your computer and use it in GitHub Desktop.

Select an option

Save mrroot5/b109ea81d13c12bf96a8 to your computer and use it in GitHub Desktop.
With this gist we can select/deselect an option with chosen select plugin: https://github.com/harvesthq/chosen https://github.com/harvesthq/chosen/issues/1559
$('option').prop('selected', true); //true to select all, and false to deselect.
$('select').trigger('chosen:updated');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment