I have been facing an issue when none checkbox is checked then button will not be disabled it's still enabled.
I also put attribute on button of disabled but still it's enabled;
here is my code
<input class="form-check-input tab1_chk" type="checkbox" name="2[]" value="1">Option 1
<input class="form-check-input tab1_chk" type="checkbox" name="2[]" value="2">Option 2
<input class="form-check-input tab1_chk" type="checkbox" name="2[]" value="2">Option 3
<br>
<br>
<button type='button' class='tab1_btn' name="next" id="next">
Next
</button>
if ($(".tab1_chk:checked" )) {
$('.tab1_btn').prop('disabled', false);
} else {
$('.tab1_btn').prop('disabled', true);
}
When I give the alert before this $('.tab1_btn').prop('disabled', false);
Then alert is showing when it's run but also giving alert 2 before this $('.tab1_btn').prop('disabled', true); then alert is not showing only first alert is showing
I need when no any checkbox is checked then next button will be disabled