Answer the question
In order to leave comments, you need to log in
How to select option selected correctly?
There is a form, inside the table, in the table select , it is necessary to cycle through val from option and depending on val ... that's another story)
$('.table tr').each((index, el) => {
const firstTd = $(el).find('.cat').children("option:selected").val();
if (firstTd === 13) {
console.log("есть 13");
}
})
Answer the question
In order to leave comments, you need to log in
const select = $(".select")
if(select.val == "13"){
alert("13");
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question