Closed kisloid2001 closed 1 year ago
does not work: var rrr="['4','5']"; $('.select2').val(rrr).trigger('change');
Remove the double quotes:
var rrr = ['4','5'];
This appears to be more of a usage question than a bug report or common feature request. As we continue to keep the Select2 issue tracker geared towards these two areas, bug reports and common feature requests, we are redirecting usage questions to other communities such as the mailing list, IRC, or Stack Overflow.
does not work: var rrr="['4','5']"; $('.select2').val(rrr).trigger('change');
ok: $('.select2').val(['4','5']).trigger('change');
how do I mark ?