title: jQuery : input type text value is showing in alert
body: <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> function ValidateLogin() {
     alert($("#txtUserName").val());
     //alert($('#txtUserName').val());
   }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  
  &lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
    &lt;title&gt;Login | Profi Admin&lt;/title&gt;
    &lt;link href="css/960.css" rel="stylesheet" type="text/css" media="all" /&gt;
    &lt;link href="css/reset.css" rel="stylesheet" type="text/css" media="all" /&gt;
    &lt;link href="css/text.css" rel="stylesheet" type="text/css" media="all" /&gt;
    &lt;link href="css/login.css" rel="stylesheet" type="text/css" media="all" /&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div class="container_16"&gt;
      &lt;div class="grid_6 prefix_5 suffix_5"&gt;
        &lt;h1&gt;Login&lt;/h1&gt;
        &lt;div id="login"&gt;
          @*
          &lt;p class="tip"&gt;You just need to hit the button and you're in!&lt;/p&gt;
          &lt;p class="error"&gt;This is when something is wrong!&lt;/p&gt;*@
          &lt;form id="form1" name="form1" method="post" action=""&gt;
            &lt;p&gt;
              &lt;label&gt;
                &lt;strong&gt;Username&lt;/strong&gt; 
                &lt;input type="text" name="UserName" class="inputText" id="txtUserName" /&gt;
              &lt;/label&gt;
            &lt;/p&gt;
            &lt;p&gt;
              &lt;label&gt;
                &lt;strong&gt;Password&lt;/strong&gt;
                &lt;input type="password" name="Password" class="inputText" id="txtPassword" /&gt;
              &lt;/label&gt;
            &lt;/p&gt;
            &lt;a class="black_button" onclick="return ValidateLogin();"&gt;&lt;span&gt;Authentification&lt;/span&gt;&lt;/a&gt;
            &lt;label&gt;
              &lt;input type="checkbox" name="checkbox" id="checkbox" /&gt;Remember me&lt;/label&gt;
          &lt;/form&gt;
          &lt;br clear="all" /&gt;
        &lt;/div&gt;
        &lt;div id="forgot"&gt;
          &lt;a href="#" class="forgotlink"&gt;&lt;span&gt;Forgot your username or password?&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;br clear="all" /&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here, in the alert, I am not getting the UserName. I also tried using single quotes, still it's not showing up.</p>