title: How to make a checkbox checked with jQuery?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/426258/how-do-i-check-a-checkbox-with-jquery-or-javascript">How do I check a checkbox with JQuery or Javascript?</a>  </p>
  </blockquote>
  
  
  
  <p>I'm trying to make a checkbox checked (or not) with jQuery.</p>
  
  <p>My example HTML:</p>
  
  <pre><code>&lt;input type="checkbox" id="test" name="test" /&gt;
  </code></pre>
  
  <p>Attempt at clearing a checkbox(doesn't work)</p>
  
  <pre><code>$('#test').val('off');
  </code></pre>
  
  <p>and at checking: </p>
  
  <pre><code>$('#test').val('on');
  </code></pre>
  
  <p>How do I control checkboxes with jQuery?</p>