Question : select2 on change
Answered by : hirohito
<script> $('#exampleSelect2').select2().on('change', function(){ // ... });
</script>
Source : | Last Update : Sat, 30 Oct 21
Question : select2 change value
Answered by : murtaza-hasan
$("#drpServices").select2().val("0").trigger("change");
Source : https://stackoverflow.com/questions/25187926/how-to-set-selected-value-of-jquery-select2 | Last Update : Wed, 05 Oct 22
Question : to change select2 option
Answered by : poor-pygmy-rdinljnz2bee
$('.select2').val(response.class).trigger('change');
Source : | Last Update : Fri, 18 Aug 23
Question : select2 on change
Answered by : k-e-h-rahat
$('#select2-positions').select2().on("change", function (e) { console.log($(this).val())
});
Source : | Last Update : Sun, 04 Dec 22
Question : select2 select value in not changing
Answered by : daljeet-singh
any .val() updates need to be followed by
$('#unit').val('21'); // Select the option with a value of '21' $('#unit').trigger('change'); // Notify any JS components that the value changed
Source : | Last Update : Sat, 31 Jul 21
Question : select2 on change
Answered by : mohamed-taki
$('#mySelect2').on('select2:select', function (e) { // Do something
});
Source : https://select2.org/programmatic-control/events | Last Update : Mon, 11 Sep 23