xxxxxxxxxx
!$("input:radio[value='7'][name='employee-type']").prop('checked')
xxxxxxxxxx
$("input[name='nameOfYourRadioButton']").attr("checked", false);
$('input:radio[name="IntroducerType"]').removeAttr('checked');
$('input:radio[name="IntroducerType"]').prop('checked', false);
xxxxxxxxxx
$('#element').click(function() {
if($('#radio_button').is(':checked')) { alert("it's checked"); }
});
xxxxxxxxxx
$('#radio-button-id').click(function() {
if($('#radio-button-id').is(':checked'))
{
//input where you put a value
$('#program').val("radio-button-text");
}
});
xxxxxxxxxx
$(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!');
}
});
});
xxxxxxxxxx
$(function() {
var $radios = $('input:radio[name=gender]');
if($radios.is(':checked') === false) {
$radios.filter('[value=Male]').prop('checked', true);
}
});
xxxxxxxxxx
$('input:radio[name="postage"]').change(function(){
if ($(this).val() == 'Yes') {
//true
}
else {
//false
}
});
jQuery radio button is checked false
xxxxxxxxxx
$("#radio_1").prop("checked", false);