Check all item will enable select all checkbox

Check all item will enable select all checkbox

Hi

Example i have 2 or more set of checkbox list, then I want select all will be checked after all item within <div> checked.


The problem is in else line where i declare var areAllChecked. Confuse how to do only effect within div.

Thanks in advance.