VY
но именно это и вызывает ошибки
Size: a a a
VY
А
С
A
A
MR
MR
$("#select1").change(function() {
if ($(this).data('options') == undefined) {
$(this).data('options', $('#select2 option').clone());
}
var id = $(this).val();
var options = $(this).data('options').filter('[value=' + id + ']');
$('#select2').html(options);
});
$('#select1').change();
U
E
d
E
Кm
function isset(val) {проверяет существование константы, если ее нет - создает.
return typeof val !== 'undefined';
}
if (!isset(hiddenFields)) {
const hiddenFields = document.querySelector("#hiddenFields");
}
if (!isset(updatePromo)) {
const updatePromo = document.querySelector("#updatePromo");
}
if (!isset(showSubId)) {
const showSubId = document.querySelector("#showSubId");
}
if (!isset(setChange)) {
const setChange = document.querySelector("#promo_id_change");
}
if (!isset(setChange)) {вызывает ошибку.
const setChange = document.querySelector("#promo_id_change");
}
Uncaught ReferenceError: setChange is not defined
A
Кm
u
A
MR
Кm
A
MR