Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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 by select2.org #
 
PREVIOUS NEXT
Tagged: #Select #options #control #based #values #Jquery
ADD COMMENT
Topic
Name
4+3 =