title: val() does not grab the current input value
body: <p>I'm trying to grab the value of an input field, but it won't grab it when it's updated. I'm trying to create an ajax log in form. Here's the code</p>
  
  <pre><code>&lt;form method="post" id="contactform"&gt;
      &lt;label for="name"&gt;Username&lt;/label&gt;
      &lt;input type="text"  id="un" placeholder="Username"  /&gt;
  
      &lt;label for="password"&gt;Password&lt;/label&gt;
      &lt;input type="password"  id="pw" placeholder="Password"  /&gt;
  
      &lt;br/&gt;
      &lt;button name="submit" type="submit" class="btn" id="submit" onclick="logUserIn(); return false;"&gt;Log In&lt;/button&gt;
  
      &lt;script type="text/javascript"&gt;
      function logUserIn()
      {
          var un = $("#un").val();
          var pw = $("#pw").val();
  
          alert(un);
      }
      &lt;/script&gt;
  </code></pre>
  
  <p>If I type something in the input field and click the submit button it won't update for me.</p>
  
  <p>If I were to change the input value field manually like this</p>
  
  <pre><code>&lt;input type="text"  id="un" placeholder="Username" value="test" /&gt;
  </code></pre>
  
  <p>Then I get alerted "test".</p>