First I alert this, and alert 'undefined':
alert($("input[name='searchManagers']:checked").val()); But when I try this, why alert 'no':
if($("input[name='searchManagers']:checked").val() == 'undefined') alert('yes') else alert('no') That fix my problem:
if(typeof $("input[name='searchManagers']:checked").val() == 'undefined') alert('yes') else alert('no')
if(typeof $("input[name='searchManagers']:checked").val() == 'undefined')- what happens now?