Sunday, 15 September 2013

check if radio button is not empty

check if radio button is not empty

radio = $('input:radio[name=priority]:checked').val();
// if radio hv checked
if(radio !== ""){
// do something
}
this doesn't work, what should be inside my if statement? I tried other
field like username !=="" it work fine, but not for the radio field..

No comments:

Post a Comment