$('[name="first"]').change(function(){ var $t=$(this); if(!$t.prop('checked')) return; $('[name="sec"],[name="third"]').attr('disabled',true); $('[name="'+($t.val()=='no'?'third':'sec')+'"]').removeAttr('disabled'); });