There are some other threads which ask this question, but I think I think I have a slightly different issue.
I am trying to make a form where the submit button initially is disabled, and when the form is complete the button will become enabled. After struggling for a while, I found a post which I modeled the following code:
$('input, textarea, select').blur(function()
{
if( !$(this).val() ) {
$('#submit').removeAttr('disabled');
}
});
I soon realized that this wasn't going to work because in this code, the "this" refers only to the input tag which you just left, not all of the input tags at once. How can I refer to all of the input, select, and textarea tags at once in order to check if ALL of them are not empty?
Also, the way I made my form was that not all of the input boxes showed up at once. Some inputs didn't apply to people who answered "no" to a certain question, so I used the jquery slide up and down to get rid of them etc. Initially those tags are not showing. Do I have to modify this jquery function for it to check if those inputs are empty as well?