title: jquery .val() and .length methods not working as intended
body: <p>In the below code <code>.val()</code> returns no result and <code>.length</code> always returns '1' for whatever input typed. Where am I going wrong ?</p>
  
  <p>Below is the HTML file 
      </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Page Title&lt;/title&gt;
      &lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" /&gt;
      &lt;script src="http://code.jquery.com/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
      &lt;script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form&gt;
          &lt;input type="text" name="my_name" id="my_name" &gt;
  
          &lt;button type="submit"  id="submit_btn1" name="submit" &gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Below is the Javascript file</p>
  
  <pre><code>&lt;script&gt; 
          $(function(){
              var value = $("#my_name").val();
              var name_length=$('#my_name').length;
              $('#my_name').keyup(function(){
                 alert(name_length);
                 alert(value);
             });
          });
  &lt;/script&gt;
  </code></pre>