//true if checked and false if not
$("#radio").is(':checked');
$('#element').click(function() {
if($('#radio_button').is(':checked')) { alert("it's checked"); }
});
$(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!');
}
});
});
if ($('input[type="radio"]:checked').length) {
// do something
}
BY LOVE
if ($("input[name='Gender']:checked").length == 0)
//<input type="radio" name="book_condition" value="3" >
$("input:radio[value='3'][name='book_condition']").prop('checked',true);
/*
A quick way to check if a radio button as been checked is by using
the .is(":checked") fucntion. A small example below :)
*/
var myElem = jQuery('#elemId'); // select the radio element
var testResult = myElem.is(":checked"); // returns true if checked, else false
$("#myRadioID").click();