4,554
edits
No edit summary Tag: Manual revert  | 
				No edit summary Tag: Reverted  | 
				||
| Line 13: | Line 13: | ||
     // Initial check to set the visibility based on the current state of filters  |      // Initial check to set the visibility based on the current state of filters  | ||
     updateFeaturedVisibility();  |      updateFeaturedVisibility();  | ||
    // Initial checks with CSS classes  | |||
    checkFiltersCleared('#list', communityFeatured);  | |||
    checkFiltersCleared('#list-list', communityListFeatured);  | |||
     if (communityFeatured.length && filteredCards.length >= 2) {  |      if (communityFeatured.length && filteredCards.length >= 2) {  | ||
| Line 108: | Line 112: | ||
     }  |      }  | ||
	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');  | ||
	    if (checkedFilters.length === 0) {  | 	    if (checkedFilters.length === 0) {  | ||
	        communityElement.removeClass('hidden').addClass('visible').addClass('show');  | |||
	    } else {  | 	    } else {  | ||
	        communityElement.removeClass('visible show').addClass('hidden');  | |||
	    }  | 	    }  | ||
	}  | 	}  | ||
| Line 132: | Line 132: | ||
	    checkFiltersCleared('#list-list', communityListFeatured); // Call the function directly without delay  | 	    checkFiltersCleared('#list-list', communityListFeatured); // Call the function directly without delay  | ||
	});  | 	});  | ||
	// Function to check if all filters are cleared and return boolean  | 	// Function to check if all filters are cleared and return boolean  | ||