4,351
edits
No edit summary Tag: Manual revert |
No edit summary |
||
Line 153: | Line 153: | ||
}); | }); | ||
// Initial checks | |||
var selectors = ['#list', '#list-list']; | var selectors = ['#list', '#list-list']; | ||
Line 164: | Line 160: | ||
checkFiltersCleared(selector, communityFeatured); | checkFiltersCleared(selector, communityFeatured); | ||
}); | }); | ||
// Function to check if all filters are cleared and return boolean | // Function to check if all filters are cleared and return boolean | ||
Line 409: | Line 404: | ||
} | } | ||
function updateFeaturedVisibility() { | function updateFeaturedVisibility() { | ||
var selectors = ['#list', '#list-list']; | |||
var allFiltersCleared = true; | |||
selectors.forEach(function(selector) { | |||
if ($(selector + ' .filtered-value-option input[type="checkbox"]:checked').length > 0) { | |||
allFiltersCleared = false; // If any filter is checked, set to false | |||
} | |||
}); | |||
if (allFiltersCleared) { | |||
communityFeatured.show(); | |||
} else { | |||
communityFeatured.hide(); | |||
} | |||
} | |||
// closeModal function | // closeModal function | ||
function closeModal() { | function closeModal() { |