Basically I have code that checks if any checkboxes with a given class are selected. If one of those isn’t, another checkbox doesn’t get selected (parent).
Logic
for each checkbox
{
if this isn't checked then uncheck checkbox A
if all siblings aren't checked uncheck checkbox A
// recursion for grandparents as well.
}
Is there a Any() function or All() function in jQuery to do this?
Any help would be greatly appreciated.
Regards,
Jamie
Why don’t you do it like this:
when a chebox changes state, count all the checkboxes, and count all the checked checkboxes, and then compare the value’s. if they are the same, then they are all checked …