Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

multiple value selected in select2

var selectedValuesTest = ["WY", "AL", "NY"];
$(document).ready(function() {
  $("#e1").select2({
    multiple: true,
  });
  $('#e1').val(selectedValuesTest).trigger('change');
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #multiple #selected
ADD COMMENT
Topic
Name
5+4 =