Find out whether radio button is checked with JQuery?
If you have a group of radio buttons sharing the same name attribute and upon submit or some event you want to check if one of these radio buttons was checked, you can do this simply by the following code :
$(document).ready(function(){ $('#submit_button').click(function() { if (!$("input[name='name']:checked").val()) { alert('Nothing is checked!'); return false; } else { alert('One of the radio buttons is checked!'); } });});