Horje
get selected value of select2 dropdown in jquery Code Example
get select2 selected value
//initialize
$('#mySelect2').select2('data');
//get selected value
$('#mySelect2').find(':selected');
jquery to set value in select2 dropdown button
$("#u20_cre").select2().val(["1","6"]).trigger("change");
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
Source: select2.org
get selected value of select2 dropdown in jquery
$('#mySelect2').find(':selected');




Javascript

Related
build a javascript to easily change website colours theme Code Example build a javascript to easily change website colours theme Code Example
parsley validation checkbox alignment Code Example parsley validation checkbox alignment Code Example
Logical Assignment Operator null coalescing Code Example Logical Assignment Operator null coalescing Code Example
React useEffect() the side-effect runs after every rendering Code Example React useEffect() the side-effect runs after every rendering Code Example
Bot say command discord.js Code Example Bot say command discord.js Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7