title: .blur() and .keypress() not working in jQuery
body: <p>I am trying to call some functions when a text-field is focused, blurred, and when a key is pressed; however, only the focus function works. Here's what I have:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;form id="loginForm" method="post" action="login.php" style="float: right; width: 90%; margin: 0 -1px 5px 0;"&gt;
      &lt;input type="text" id="loginPass" value="password" /&gt;&lt;input type="text" id="loginName" value="email" /&gt;
      &lt;input type="submit" id="loginSubmit" value="Log In" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$('#loginPass').keypress(function() {
      alert('hey');
  });
  $('#loginPass').blur(function() {
      var lp = $('#loginPass');
      alert('val:'+lp.val());
  });
  $('#loginPass').focus(function() {
      var lp = $('#loginPass');
      if ( lp.val() == 'password' ) {
          $('#loginForm').html('\n        &lt;input type="password" id="loginPass" value="" /&gt;' +
              '&lt;input type="text" id="loginName" value="email" /&gt;' +
              '&lt;input type="submit" id="loginSubmit" value="Log In" /&gt;');
          //setTimeout(function() { lp.focus(); }, 10);
          setCaretPos(document.getElementById("loginPass"), 0);
      }
  });
  </code></pre>
  
  <p>Like I said, the focus one works as expected, but I can't even get an alert out of the other ones. Any idea what the problem is?</p>