title: jQuery unchecking and reselecting checkbox programmatically
body: <p>I have a bootstrap modal with a form inside, This means I require to programmatically set check boxes. When I attempt to programmatically select, deselect then reselect the checkbox the reselection doesn't get made.</p>
  
  <p>Whenever I call <code>.attr('checked', false);</code> the following <code>.attr('checked', true)</code> doesn't seem to make changes.</p>
  
  <p>How can I check the checkbox after it been unchecked?</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;input value="None" name="hazards[]" id="hazard1" type="checkbox"&gt;
  </code></pre>
  
  <p><strong>jQuery</strong></p>
  
  <pre><code>$('#hazard1').attr('checked', true); //automated input check
  $('#hazard1').attr('checked', false); //User cancels form and unchecks input
  $('#hazard1').attr('checked', true); //Reopens form, but doesnt get checked
  </code></pre>