the chk_all dosnt work to enable all other child boxes for the first attempt
<pre><code>&lt;input type="checkbox" id="checkMain" /&gt;
&lt;p&gt;&lt;input type="checkbox" id="checkMain1" /&gt;
&lt;p&gt;&lt;input type="checkbox" id="checkMain2" /&gt;

&lt;P&gt;&lt;input class="child" type="checkbox" id="chk1" disabled="true" /&gt;
&lt;input class="child" type="checkbox" id="chk2" disabled="true" /&gt;
&lt;input class="child" type="checkbox" id="chk3" disabled="true" /&gt;
&lt;input class="child" type="checkbox" id="chk4" disabled="true" /&gt;
&lt;input class="child" type="checkbox" id="chk5" disabled="true" /&gt;
&lt;input class="child" type="checkbox" id="chk6" disabled="true" /&gt;
&lt;input class="child" type="checkbox" id="chk_all" disabled="true" /&gt;ALL&lt;/p&gt;
&lt;/html&gt;








$
        (
            function()
            {           
                $("input[id^=checkMain]").click 
                ( 
                    function() 
                    {               
                        var otherCks = $("input[id^=checkMain]").not(this);
                          if( !$(this).is( ":checked" ))
                        {                        
                            $(".child").attr("disabled" , true ); 
                              $(function()
                                        {
                                            $("#chk_all").click(function()
                                                 {
                                                    var checked_status=this.checked
                                                    $("input[id^=chk]").each (function()
                                                      {
                                                       this.checked=checked_status;
                                                       });
                                                  });
                                         }
                                    );                             
                            otherCks.removeAttr ( "disabled" );
                          }                   
                        else
                        {                        
                            $(".child").removeAttr ( "disabled" );                  
                            otherCks.attr("disabled" , true)

                        }          

                    }
                );      
            }
        );
</code></pre>
