Skip to content

Instantly share code, notes, and snippets.

@chukShirley
Created January 18, 2017 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chukShirley/f7d64d7ffa3f4ea80dd8f96df51267f9 to your computer and use it in GitHub Desktop.
Save chukShirley/f7d64d7ffa3f4ea80dd8f96df51267f9 to your computer and use it in GitHub Desktop.
Select2 on change event
$(document).ready(function() {
$('#mySelect2').select2({
// properties
}).on('change', function (e, added) {
// If an option has been selected
if (e.val !== '') {
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment