4,396
edits
No edit summary |
No edit summary |
||
Line 143: | Line 143: | ||
} | } | ||
// Event delegation for filter changes in both block and list views | // Event delegation for filter changes in both block and list views | ||
$('#list, #list-list').on('change', '.filtered-value-option input[type="checkbox"]', function() { | $('#list, #list-list').on('change', '.filtered-value-option input[type="checkbox"]', function() { | ||
Line 165: | Line 153: | ||
}); | }); | ||
/* // Initial checks | |||
checkFiltersCleared('#list', communityFeatured); | |||
checkFiltersCleared('#list-list', communityFeatured); */ | |||
// Array of selectors | |||
var selectors = ['#list', '#list-list']; | |||
// Iterate over the selectors and perform initial checks | |||
selectors.forEach(function(selector) { | |||
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 |