I have a select box, and I\'d like to add a confirm before changing it to a specific option. Example:
If you are using Select2, you can use something below,
$('select').on('select2:selecting', function() { if (!confirm('Are you sure you?')) { $(this).select2('close') return false } })