Jquery checkbox problem
<p>Hi this is my check boxes</p>

<pre><code>&lt;table cellpadding="0" cellspacing="0" border="1" bordercolor="red" width="100%" &gt;
&lt;tr&gt;&lt;td width="50%"&gt;&lt;input type="checkbox" name="businessTypeGroup" id="chkAll" value="0" &gt;All&lt;/TD&gt;&lt;TD&gt;&lt;input type="checkbox" name="businessTypeGroup" id="chkBuyer" value="1"&gt;Buyer/Importer&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;input type="checkbox" name="businessTypeGroup" id="chkSeller" value="2"&gt;Seller/Exporter/Manufacturer&lt;/TD&gt;&lt;TD&gt;&lt;input type="checkbox" name="businessTypeGroup" id="chkService" value="3"&gt;Service Provider&lt;/td&gt;&lt;/tr&gt;                          
&lt;tr&gt;&lt;td&gt;&lt;input type="checkbox" name="businessTypeGroup" id="chkDistributor" value="4"&gt;Distributor&lt;/td&gt;&lt;td&gt;&lt;input type="checkbox" name="businessTypeGroup" id="chkSupplier" value="5"&gt;Supplier&lt;/TD&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan="2"&gt;&lt;input type="checkbox" name="businessTypeGroup" id="chkTrading" value="6"&gt;Trading Company&amp;nbsp;&lt;span id="businessTypeGroupError"&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>As per this code one senario is not working 
1] try to check other checkboxes not able to check All </p>

<pre><code>$("input:checkbox[name='businessTypeGroup']").click (function(){
$("input:checkbox[name='businessTypeGroup']").click (function(){
var totalCheckboxes = $("input:checkbox[name='businessTypeGroup']").length;         
var checkedCheckboxes = $("input:checkbox[name='businessTypeGroup']:checked").length;
    if ( totalCheckboxes === checkedCheckboxes ){               
        $("#chkAll").attr("checked" , true );   
    }else{
        $("#chkAll").attr("checked" , false );
    }   
   });
 });

 $("#chkAll").click ( function(){
   $("input:checkbox[name='businessTypeGroup']").attr ( "checked" , $(this).attr("checked") );  
});
</code></pre>
