title: jQuery get input value after keypress
body: <p>I have the following function:</p>
  
  <pre><code>$(document).ready(function() {
      $("#dSuggest").keypress(function() {
          var dInput = $('input:text[name=dSuggest]').val();
          console.log(dInput);
          $(".dDimension:contains('" + dInput + "')").css("display","block");
      });
  });
  </code></pre>
  
  <p>For some reason, for the first keypress, I'm getting an empty string to the console log.</p>