jQuery Check to see if any radio button in a group is checked

Use the name attribute selector, combined with the checked selector to determine if any radio button in a group has been selected.
if ($('input[name=whatsmyname]:checked').length)
	// something got checked
Posted by
Snippet Viewed 8139 times.

Share your jQuery code snippets:

  • Get some recognition & a link back to your site.
  • Create your own code library.
  • Help your fellow developers, as they have helped you.


Submit | Browse

Most Recent jquery snippets

Most Viewed