Вот мой HTML-код:
Код: Выделить всё
A
B
Код: Выделить всё
$('select').select2(); // this line is running first always
// and there is no way to change the order
$('#myselect').val('a'); // this line is run after select2 built
// his elements
Подробнее здесь: https://stackoverflow.com/questions/373 ... lect-field