bootstrap method=get dropdown javascript select2 redirect code example
Example 1: select2 destroy
if ($('#mySelect2').hasClass("select2-hidden-accessible")) {
// Select2 has been initialized
$('#mySelect2').select2('destroy');
}
Example 2: select2.org events
$('#mySelect2').on('select2:select', function (e) {
var data = e.params.data;
console.log(data);
});