0
Вот мой случай:Выбор2 - Бесконечный цикл с пусковым механизмом («изменить»)
$('select').select2();
$('select').on('change', function() {
// calling a function
myFunction();
});
function myFunction() {
// changes my select values
// so I need to update the select for seing the news values
$('select').trigger('change');
// hehe I fire the change event so myFunction is called again and again
}
Что я могу сделать, чтобы избежать такого поведения? С уважением ...