title: how to get input type email's value from jquery
body: <p>I was trying to get the <code>&lt;input type="email" name="mail"&gt;</code>'s value from <code>jQuery</code>.<br>
  I've to run a validation for checking <code>mail</code>'s value </p>
  
  <pre><code>&lt;script&gt;
      function valid(){
          var em = $.trim($('input:email[name=mail]').val());
          if(em.length &lt; 5){
              alert('Please enter email id');
              return false;
          }
          return true;
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>but the form is still submitting if the user left <code>mail</code> blank.<br>
  I've gone through <a href="http://api.jquery.com/category/selectors/form-selectors/" rel="nofollow">jQuery API Doc</a> but not found any <code>selector</code> for <code>email</code>. Why so?<br>
  Why it is not present there and how would I solve this problem?</p>