title: jQuery checkbox check all and remove all
body: <p>Ok so i have this code that works great for checking and un-checking all of the checkboxes in a form. But if you check them all then check none of them then try to check all again nothing happens. </p>
  
  <p>What can be done to fix this?</p>
  
  <pre><code>$('#yearall').click(function() {
      var c = this.checked;
      $('.year:checkbox').prop('checked',c);
  });
  $('#yearNone').click(function() {
      var c = this.checked;
      $('.year:checkbox, #yearall').removeProp('checked',c);
  });
  </code></pre>
  
  <p>I have greated a fiddle here <a href="http://jsfiddle.net/nf75M/" rel="nofollow">http://jsfiddle.net/nf75M/</a></p>