I'm trying to check if any one of the three radio buttons having the same class is checked or not, and depending on the result, I want to hide or show another radio button.
var MyThreeRadioButtons = $(".radioButtonsIWantToCheck");
MyThreeRadioButtons.change(function () {
if (MyThreeRadioButtons.is(":checked")) {
$(".buttonIwantToHide:radio").hide();
} else {
$(".buttonIwantToHide:radio").show();
}
});
When I added console.log statements to see if the code is invoked, I noticed that the code doesn't run when I uncheck any of the radio buttons.