select2 override function 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);
});