title: disable button until input and file fields have got value
body: <p>I have got a form here:</p>
  
  <pre><code>&lt;form action="#" method="post"&gt;
  Text: &lt;input type="type" name="text" id="text" /&gt;&lt;br /&gt;
  File: &lt;input type="file" name="fileInput" id="fileInput" /&gt;&lt;br /&gt;
  &lt;select name="cars"&gt;
  &lt;option value="volvo"&gt;1&lt;/option&gt;
  &lt;option value="saab"&gt;2&lt;/option&gt;
  &lt;option value="mercedes"&gt;3&lt;/option&gt;
  &lt;option value="audi"&gt;4&lt;/option&gt;
  &lt;/select&gt;&lt;br /&gt;
  &lt;input type="submit" value="submit" disabled /&gt;
  &lt;/form&gt;
  &lt;div id="result"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>And I want to disable a submit button until all fields(including dropdown) have been filled out or chosen.</p>
  
  <p>My code is:</p>
  
  <pre><code>$(document).ready(
   function() {
                  $('form &gt; input').keyup &amp;&amp; $('input:file').change(function() {
                    var empty = false;
                    $('form &gt; input').each(function() {
                     if ($(this).val() == '') {
                     empty = true;
                     }
                     });
  
                      if (empty) {
                    $('#submit').attr('disabled', 'disabled');
                    } else {
                   $('#submit').removeAttr('disabled');
                    }
                     });
                    };
  function(){
      $('input:file').change(
          function(){
              if ($(this).val()) {
                  $('input:submit').attr('disabled',false); 
              } 
          }
          );
  });
  </code></pre>
  
  <p>Please help activate button when input got some text, dropdown has got a value and input type got a file selected.</p>
  
  <p>My fiddle is here: <a href="http://jsfiddle.net/E42XA/214/" rel="nofollow">http://jsfiddle.net/E42XA/214/</a></p>
  
  <p>Thank you.</p>