1st dropdown values(1, 2, 3, 4, 5) second dropdown values(25, 26, 27, 28, 29) third dropdown values(35, 36, 37, 38, 39)
I want every drop down to be loaded with that data and it is dropdown, the data needs to be loaded dynamically or automatically to get the update.
$('select[name="SubCategoryID[]"] option').each(function (e, v) {
if (val.SubCategoryID == v.value) {
console.log('', v.value);
$(`select[name="SubCategoryID[]"] option value`).find(v.value).val(v.value)
} else {
}
});
$('select[name="SubCategoryID[]"] option').each(function (e, v) {
if (val.SubCategoryID == v.value) {
console.log('dropdown', $(this).val());
$(this).attr("selected", "selected");
$(`select[name="SubCategoryID[]"] option value`).find(v.value).val(v.value)
} else {
// console.log('Done');
}
});