Answers for "select2 jquery example"

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
2

Select options of Select2 control based on values using Jquery

$('#mySelect2').val('1'); // Select the option with a value of '1'
$('#mySelect2').trigger('change'); // Notify any JS components that the value changed
Posted by: Guest on September-16-2021
1

select2 jquery example search

$(document).ready(function() 
  {
      $ ('#countries').select2();
  });
Posted by: Guest on October-05-2021

Browse Popular Code Answers by Language