title: Prevent submitting blank input and textarea
body: <p>I am working with an <code>input</code> a <code>textarea</code> and a <code>input</code> <code>button</code> . I need that the <code>button</code> is <code>disabled</code> when the <code>input</code> and <code>textarea</code> are <strong>empty</strong>.</p>
  
  <p>This is <strong>Html</strong></p>
  
  <pre><code>&lt;input type="text" class="area"&gt;
  &lt;textarea name="testo" class="area" cols="30" rows="10"&gt;&lt;/textarea&gt;
  &lt;input type="button" class="btn" value="send" disabled&gt;
  </code></pre>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>$('.area').on('keyup' , function() {
      if( $('input').val().length &gt; 0 &amp;&amp; $('textarea').val().length &gt; 0 ){
          $('.btn').prop('disabled', false);
      }
      else {
          $('.btn').prop('disabled', true);
      }
  });
  </code></pre>
  
  <p>It works fine, but , if a press the <code>spacebar</code> and so it types <code>blank</code> chars , the <code>length</code>s are not <code>&lt; 0</code> anymore and so the <code>button</code> not anymore <code>disabled</code>. How can I prevent this situation? </p>