when an option is clicked on select2 jquery code example
Example: select2.org events
$('#mySelect2').on('select2:select', function (e) {
var data = e.params.data;
console.log(data);
});
$('#mySelect2').on('select2:select', function (e) {
var data = e.params.data;
console.log(data);
});