Answer the question
In order to leave comments, you need to log in
How to make radio recognition in jquery?
there is such a radio that
needs to be done so that if yes then one number is variably assigned if no then another
How to recognize what is selected?
<label for="lp_ab">А/Б тестирование</label>
<label><input type="radio" name="lp_ab" id="a1" required class="lp1" />yes</label>
<label><input type="radio" name="lp_ab" id="a2" required class="lp1" checked/>no</label>
<br>
Answer the question
In order to leave comments, you need to log in
$('[name="lp_ab"]').change(function () {
if($('[name="lp_ab"]:checked').attr('id') === 'a1'){
/// yes
} else {
/// no
}
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question