title: Javascript - how to show DIV after putting text into <input>
body: <p>I'm trying to write function in JavaScript  which will show/hide 'DIV' after putting some text into . </p>
  
  <p>I managed to write it, however I cannot to make it work only if user put to the 'input' value bigger than 8.</p>
  
  <p><strong>Html:</strong>    </p>
  
  <pre><code>&lt;input type='text' id='area' style='border: 1px solid;'&gt;&lt;/input&gt;&lt;br&gt;
  &lt;div id='text1' style='display:none; '&gt;Examletext&lt;/div&gt;
  </code></pre>
  
  <p><strong>JavaScript</strong>: </p>
  
  <pre><code>$(document).ready(function() {
      $("#area").keyup(function() {
          if ($('#text1').is(":hidden")) {
              $('#text1').show(500);
          } else {
              $("#text1").hide(500);
          }
      });
  });
  </code></pre>
  
  <p>Above is working script, but this works whatever you put into the 'input'. I want execute the script only when I put value bigger than 8 (9, 10, 101 etc.)</p>
  
  <p>I tried to add this(no effect):</p>
  
  <pre><code>if ($("#area").value &gt; 8){}
  </code></pre>
  
  <p>Here is the working script where I have commented out line described above - <a href="http://jsfiddle.net/tVW3u/" rel="nofollow">jsfiddle</a></p>