Consider a simple .aspx page. There are sections in this page and each section has a header with a checkbox control. When selected it selects the other checkboxes that are within that section of the page. Think of it as a ‘Select All in This Section’ option as opposed to ‘Select All on the Page’. I’d like to do this via jQuery but can’t figure out how to keep all of the checkboxes from being selected as opposed to just those within that certain sub-section.
Share
try some thing like this
you can create wrapper div for ur header and sub_header like this
Then check if the header checkbox is selected, then select the sub_header in the next child div element, as follows
});
I think u can shorten the jquery selector … check this