title: How to show an alert if all checkboxes aren't checked?
body: <p>I want alert if check-box is <strong>not</strong> checked (- this is working )</p>
  
  <p>and </p>
  
  <p>Alert if <strong>ALL</strong> check-box is <strong>not</strong> checked  ( need help in this )</p>
  
  <p><em>CheckBox :</em></p>
  
  <pre><code>&lt;input type="checkbox" value="1" id="data" name="data[]"&gt;
  &lt;input type="checkbox" value="2" id="data" name="data[]"&gt;
  &lt;input type="checkbox" value="3" id="data" name="data[]"&gt;
  </code></pre>
  
  <p><em>Button :</em></p>
  
  <pre><code>&lt;input name=\"submitclose\" type=\"submit\"  value=\"Close\" id=\"submitclose\"&gt;
  </code></pre>
  
  <p><em>Below is my Jquery :</em></p>
  
  <pre><code>echo "&lt;script&gt;
  jQuery(function($)  {
  $(\"input[id='submitclose']\").click(function() {  
  
                  var count_checked = $(\"[id='data']:checked\").length; 
                  if (count_checked == 0)  {
                          alert(\"Please select a Packet(s) to Close.\");
                          return false;
                  } else{     
                          return confirm(\"Are you sure you want to Close these Packet?\");
                  }  
          });
  }); 
  &lt;/script&gt;";
  </code></pre>