I have this code:
setInterval(function(){
if($("#username_error").val() == "" && $("#password_error").val() == "" && $("#email_error").val() == ""){
$('input[type="submit"]').removeAttr('disabled');
} else {
$('input[type="submit"]').attr('disabled','disabled');
}
}, 10);
I need to disable the submit button if there are no errors for three divs. When I run this code, nothing happens. But if I do an alert() this if statement runs correctly. What am I doing wrong here?
setOverkill.