title: jQuery onkeyup method not defined
body: <p>the onkeyup method is supposedly not defined, however, the method is auto-recommended to me by my ide. When I view the error in chrome dev tools I get the error Uncaught TypeError: Object [object Object] has no method 'onkeyup'. I am using the latest version of jQuery. Here is my code:</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;script type="text/javascript" src="jquery-1.7.2.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
          $(document).ready(function(){
              $("button").click(function(){
                  var str = document.getElementById('txt1').value;
                  $.post("addName.php", {q: str});
              });
              $("input").onkeyup(function(){
                  var str = document.getElementById('txt1').value;
                  $.post("gethint.php", {q: str});
              });
          });
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;h3&gt;Start typing a name in the input field below:&lt;/h3&gt;
  &lt;form action=""&gt;
      First name: &lt;input type="text" id="txt1"/&gt;
  &lt;/form&gt;
  &lt;p&gt;Suggestions: &lt;span id="txtHint"&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;button&gt; Add Name&lt;/button&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>