4,554
edits
No edit summary Tag: Reverted  | 
				No edit summary Tag: Manual revert  | 
				||
| Line 108: | Line 108: | ||
     }  |      }  | ||
	// Function to check if filters are cleared and update visibility of community elements  | |||
	function checkFiltersCleared(selector, communityElement) {  | 	function checkFiltersCleared(selector, communityElement) {  | ||
	    var checkedFilters = $(selector + ' .filtered-value-option input[type="checkbox"]:checked');  | 	    var checkedFilters = $(selector + ' .filtered-value-option input[type="checkbox"]:checked');  | ||
	    console.log("Checked filters count in " + selector + ":", checkedFilters.length);  | 	    console.log("Checked filters count in " + selector + ":", checkedFilters.length);  | ||
	    if (checkedFilters.length === 0) {  | 	    if (checkedFilters.length === 0) {  | ||
	        console.log("All filters are cleared  | 	        console.log("All filters are cleared in " + selector);  | ||
	        communityElement.  | 	        communityElement.show();  | ||
	    } else {  | 	    } else {  | ||
	        console.log("  | 	        console.log("Some filters are still active in " + selector);  | ||
	        communityElement.  | 	        communityElement.hide(); // Hide the element if any filters are active  | ||
	    }  | 	    }  | ||
	}  | 	}  | ||