title: jQuery, Chrome, and Checkboxes. Strange Behavior
body: <p>I've looked around the site and can't seem to find an answer for this question. Feel free to direct me to said question, if it does indeed exist.</p>
  
  <p>I'm currently trying to do some tree-based checkbox operations, and I've come accross some behavior that I find strange.</p>
  
  <p>In Google Chrome, I find that checking a checkbox leaves some "residue", if you will, that will not allow me to check or uncheck that checkbox using "attrRemove('checked');"</p>
  
  <p>Interestingly enough, Internet Explorer (9) has the result I am going for. Please see this jsFiddle in both Chrome and IE for a good comparison of the effects.</p>
  
  <p><a href="http://jsfiddle.net/xixionia/9K5ft/" rel="nofollow noreferrer">http://jsfiddle.net/xixionia/9K5ft/</a></p>
  
  <p>Can anyone explain these difference, and how I might be able to check / uncheck a checkbox in chrome which has been checked "by hand" ?</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;input type="checkbox" /&gt;
  &lt;input type="checkbox" /&gt;
  &lt;input type="checkbox" /&gt;
  &lt;input type="checkbox" /&gt;
  &lt;input type="checkbox" /&gt;
  </code></pre>
  
  <p><strong>JavaScript</strong></p>
  
  <pre><code>$(':checkbox').click(function(e) {
  
      if($(this).is(':checked')) {
          $(':checkbox').attr('checked', 'checked');
      } else {
          $(':checkbox').removeAttr('checked');
      }
  });
  </code></pre>
  
  <p>Thanks in advance for your help. :)</p>
  
  <p><strong>edit:</strong></p>
  
  <p>I was able to find this work around. If anyone else has any other solutions, please let me know, and I'll mark it as the solution. :)</p>
  
  <pre><code>$(':checkbox').click(function(e) {
      var value = this.checked;
      $(':checkbox').each(function(){ this.checked = value; });
  });
  </code></pre>
  
  <p><strong>edit:</strong></p>
  
  <p>Turns out, this problem is specific to jQuery 1.6. Previous versions of jQuery do not suffer from this issue. However, I have posted a solution here: <a href="https://stackoverflow.com/questions/426258/how-do-i-check-a-checkbox-with-jquery-or-javascript/5407529#5407529">Setting &quot;checked&quot; for a checkbox with jQuery?</a></p>