I've attempted with the following code, to check if three radio buttons are checked, then check one if none in the set are:
if ($('input[title="a"]:selected').length == 0
&& $('input[title="b"]:selected').length == 0
&& $('input[title="c"]:selected').length == 0
) {
console.log("Nothing checked");
$('input[title="b"]').prop("checked",true);
}
}
it logs in the console every time (regardless of their states) and doesn't check the radio button.