Skip to content

Instantly share code, notes, and snippets.

@jjmartucci
Created January 29, 2015 15:56
Show Gist options
  • Save jjmartucci/443461bdd069f308e33a to your computer and use it in GitHub Desktop.
Save jjmartucci/443461bdd069f308e33a to your computer and use it in GitHub Desktop.
jQuery verify a radio button group has been checked
if (!$("input[name='html_elements']:checked").val()) {
alert('Nothing is checked!');
}
else {
alert('One of the radio buttons is checked!');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment