Hey everyone I am having a little problem with my jQuery I am trying to validate several forms and check to see if the element exists and then check to see if the radio button is selected. but It keeps ignoring my code and submitting the form.
else if ($('fieldset').is('.customer')) {
if (!$('input:radio[name=i_am]').is(':checked')) {
alert("Please tell us if your a new/exisiting customer");
return false;
}
}
I have several forms using the same ID’s and classes but this is the problem i am having? anyone know where I am going wrong?
Thanks
Could you change your code this way: