title: How to disable submit button when textbox, select and date are empty and enable when its done
body: <p>I've seen plenty examples of people disabling buttons if textboxes are empty but I haven't found any which will disable a button for only certain textboxes, date and select fields. I'm new to Jquery and I know it is pseudo coded but you can get the idea. Which Jquery function do I have to call so that it is constantly checking? And how can I use an or statement in the if clause to determine if any textbox field is empty?</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;form id="myform"&gt;
      Username&lt;br /&gt;
      &lt;input type="text" id="user_input" name="username" /&gt;&lt;br /&gt;
      Password&lt;br /&gt;
      &lt;input type="password" id="pass_input" name="password" /&gt;&lt;br /&gt;
      Confirm Password&lt;br /&gt;
      &lt;input type="password" id="v_pass_input" name="v_password" /&gt;&lt;br /&gt;
      Email&lt;br /&gt;
      &lt;input type="text" id="email" name="email" /&gt;&lt;br /&gt;
      Birthday&lt;br /&gt;
      &lt;input type="date" id="bday" name="birthday" /&gt;&lt;br /&gt; 
      Sex&lt;br /&gt;
      &lt;select name="sex" id="sex"&gt;
      &lt;option&gt;Male&lt;/option&gt;
      &lt;option&gt;female&lt;/option&gt;
      &lt;/select&gt;
      &lt;input type="submit" id="register" value="Register" disabled="disabled" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>&lt;script type="text/javascript&gt;
  (function() {
      $('#myform &gt; input').keyup(function() {
  
          var empty = false;
          $('form &gt; input #bday').each(function() {
              if ($(this).val() == '') {
                  empty = true;
              }
          });
  
          if (empty) {
              $('#register').attr('disabled', 'disabled');
          } else {
              $('#register').removeAttr('disabled');
          }
      });
  })()
  &lt;/script&gt;
  </code></pre>
  
  <p><a href="http://jsfiddle.net/LM4cf/" rel="nofollow">JSFIDDLE</a></p>