I have this line of code for page load:
if ($('input').is(':checked')) {
and it works fine when the radio button input is checked. However, I want the opposite. Something along the lines of
if ($('input').not(.is(':checked'))) {
so that my if statement runs when none of the radiobuttons are selected. What is the best way to go about this?
Doesn’t work?
You might also try iterating over the elements like so: