jQuery("#cat-main-close-" + category_id).click(function(){
jQuery("#cat-main-" + category_id).slideUp(GlmMap._catDivSpeed).parent().toggleClass("open");
});
- jQuery("#cat-main-" + category_id + " .catLabel input[type='checkbox']").click(function() {
- var anySubCatSelected = false;
- jQuery("#cat-main-" + category_id + " .catLabel input[type='checkbox']").each(function() {
- if ($(this)[0].checked) {
- anySubCatSelected = true;
- }
- });
- jQuery("#cat-" + category_id).toggleClass("selected", anySubCatSelected);
+ // While any checkbox of a given category is selected, preserve 'selected' class on that category's tab
+ $("#cat-main-" + category_id + " .catLabel input[type='checkbox']").on("click", function() {
+ $("#cat-" + category_id).toggleClass("selected", $("#cat-main-" + category_id + " input:checkbox:checked").length > 0);
});
});
jQuery("#memLocHdr").click(function (){