disable radio button by name jquery code example
Example 1: jquery disable radio button command
$(document).ready(function() {
$(".second").attr('disabled', true);
$(".wrap").css('opacity', '.2');
$("form input:radio").change(function() {
if ($(this).val() == "Disable") {
$(".second").attr('checked', false);
$(".second").attr('disabled', true);
$(".wrap").css('opacity', '.2');
}
else {
$(".second").attr('disabled', false);
$(".wrap").css('opacity', '1');
}
});
});
Example 2: unset radio button jquery by name
$("input:radio[name='thename']").each(function(i) {
this.checked = false;
});