title: How to compare jQuery val() and JavaScript value
body: <p>When I do the following comparison I get false although both val() and value visually display the same value:12</p>
  
  <pre><code>if ($(this).val() == txt.value)//returns false
  </code></pre>
  
  <p>When I alert both $(this).val() and txt.value I get 12. Is one of them a string and the other one an int? If so, which one's what?</p>