How can I determine if my radio buttons are selected?
For example:
if ( radio_button_selected ) {
// do something
} else {
// do something else
}
You can use this selector to determine if any are checked:
jQuery("input[name='my_button_group']:checked")
So for example:
if (jQuery("input[name='my_button_group']:checked")) {
...
}
else {
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With