Call function:
select_all({show_count: "checked",attach_count_to: "#showCarCount"})
on parent check-box
i.e. "All Cars"
Add class='selectable'
on children-checkboxes/sub-checkboxes
i.e. Aston Martin, Bentley, Audi, BMW,..
Call function:
select_all({show_count: "unchecked",attach_count_to:"#showColorCount"})
on parent check-box
i.e. "All Colors"
Add class='selectable'
on children-checkboxes/sub-checkboxes
i.e. Blue, Green, Yellow, Orange,..
Call function:
select_all({show_count: "checked_with_total",attach_count_to:"#showLangCount"})
on parent check-box
i.e. "All Languages"
Add class='selectable'
on children-checkboxes/sub-checkboxes
i.e. JAVA, C++, Javascript, Ruby,..
If "attach_count_to" parameter is not passed
then count will get attach to the parent checkbox as a sibling
i.e "All Cars" sibling
HTML
<input type="checkbox" id="selectAllCars" >
<label for="selectAllCars" >
All Cars
</label>
</input>
<input type="checkbox" id="selectAllColors" >
<label for="selectAllColors" >
All Colors
</label>
</input>
<input type="checkbox" id="selectAllLanguages" >
<label for="selectAllLanguages" >
All Languages
</label>
</input>
Javascript
$("#selectAllCars").select_all({
show_count: "checked",
attach_count_to: "#showCarCount"
});
$("#selectAllColors").select_all({
show_count: "unchecked",
attach_count_to: "#showColorCount"
});
$("#selectAllLanguages").select_all({
show_count: "checked_with_total",
attach_count_to: "#showLangCount"
});