title: jQuery - Validate all checkboxes on submit
body: <p>I have 3 checkoxes and a submit button:</p>
  
  <pre><code>&lt;form id="form1" action="/controller/action" method="post"&gt;
              &lt;div class="checkbox"&gt;&lt;input type="checkbox" name="box1" class="cBox" /&gt;&lt;label for="box1" class="label"&gt;Box1&lt;/label&gt;&lt;/div&gt;
              &lt;div class="checkbox"&gt;&lt;input type="checkbox" name="Box2" class="cBox" /&gt;&lt;label for="Box2" class="label"&gt;Box2&lt;/label&gt;&lt;/div&gt;
              &lt;div class="checkbox"&gt;&lt;input type="checkbox" name="Box3" class="cBox" /&gt;&lt;label for="Box3" class="label"&gt;Box3&lt;/label&gt;&lt;/div&gt;
              &lt;input type="submit" value="Submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I have the following jquery which alerts "Please tick all checkboxes!" when no checkboxes been ticked:</p>
  
  <pre><code>$(document).ready(function() {
      $('#form1').submit(function() {
          if ($('input:checkbox', this).is(':checked')) {
              // everything's fine...
          } else {
              alert('Please tick all checkboxes!');
              return false;
          }
      });
  });
  </code></pre>
  
  <p>Using jQuery I need:</p>
  
  <p>If all checkboxes have been ticked, once the submit button is clicked alert: "All checkboxes have been ticked". </p>
  
  <p>If all checkboxes have not been clicked then alert: "Please tick all checkboxes!" on submit.</p>
  
  <p>thanks</p>