title: Testing if a checkbox is checked with jQuery
body: <p>If the checkbox is checked, then I only need to get the value as 1; otherwise, I need to get it as 0.  How do I do this using jQuery?</p>
  
  <p><code>$("#ans").val()</code> will always give me one right in this case:</p>
  
  <pre><code>&lt;input type="checkbox" id="ans" value="1" /&gt;
  </code></pre>