select one checkbox from multiple MAIN Checkboxes,accordingly enable the child checkboxes in jquery?
<pre><code>&lt;p&gt;&lt;input type="checkbox" id="chkMain" /&gt;
&lt;p&gt;&lt;input type="checkbox" id="chkmain1" /&gt;
&lt;p&gt;&lt;input type="checkbox" id="chkmain2" /&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;

$(function(){
 $("#chkMain").click ( function() {
 if( !$(this).is ( ":checked" ) )
    {
      $(".child").attr ( "disabled" , true );
    }

    else
    {
      $(".child").removeAttr ( "disabled" );
    }
  });
});
</code></pre>

<p>this works for chkmain,n enables the child checkboxes.
what if i want to select chekmain1,n want to enable child checkbox??</p>
