Can someone explain to me why the form validation fails in chrome?
Pressing the submit should colour empty fields red.
I have no idea why chrome fails - would be glad to find a solution...
$('form .meet').focus(function() {
$('form .required').each(function() {
if($(this).val() == '') {
$(this).addClass('warning');
}
})
});
$('form .meet').click(function() {
output = true;
if($('form .warning').length > 0) {
$(this).addClass('disabled').attr('disabled','disabled');
output = false;
}
return output;
});
$('form .required').keyup(function() {
if($(this).val()) {
$(this).removeClass('warning');
if($('form .warning').length == 0) {
$('form .meet').removeClass('disabled').removeAttr('disabled');
}
}
});
.required are the input field that may not be empty
.meet are the submit fields related to .required