How to toggle checkbox selection rather than only selecting?
<p>I currently am using this JavaScript code snippet to select 3 checkboxes at a time</p>

<pre><code>$(document).ready(function() {
   var $cbs = $('input:checkbox[name="select[]"]'),
       $links = $('a[name="check"]');

   $links.click(function() {
      var start = $links.index(this) * 3,
          end = start + 3;
      $cbs.slice(start,end).prop("checked",true);
   });
});
</code></pre>

<p>Currently this code only selects the checkboxes, however I was wondering if anyone knew how to modify it so that it toggles the checkbox selection on and off?</p>

<p>Here's an example of my current code: "<a href="http://jsfiddle.net/ShZNF/" rel="nofollow">jsfiddle</a>" - click the 1-3, 4-6 links etc to check the checkboxes.</p>
