Answers for "get selected value of select2 dropdown in jquery"

2

get select2 selected value

//initialize
$('#mySelect2').select2('data');
//get selected value
$('#mySelect2').find(':selected');
Posted by: Guest on June-23-2020
0

jquery to set value in select2 dropdown button

$("#u20_cre").select2().val(["1","6"]).trigger("change");
Posted by: Guest on January-09-2021
1

Select options of Select2 control based on values using Jquery

$('#mySelect2').val(['1', '2']);
$('#mySelect2').trigger('change'); // Notify any JS components that the value changed
Posted by: Guest on September-16-2021

Code answers related to "get selected value of select2 dropdown in jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language