Answers for "jquery select2 set value dynamically tags"

2

select2 tags set value jquery

$('#mySelect').select2({
  data: ['one','two'],
  tags: true
});
$('#mySelect').val(['one','two']).trigger('change')
Posted by: Guest on July-31-2021

Code answers related to "jquery select2 set value dynamically tags"

Browse Popular Code Answers by Language