Hi, I'm trying to enable a submit button only when all the input fields are filled. Is this the correct way of checking to see if an input field is empty?
$(document).ready(function() {
$('#submit_button').attr('disabled', 'disabled');
$.each(':input', function() {
if ($(this).val() != "") {
$('#submit_button').removeAttr('disabled');
}
});
});