4,090
edits
No edit summary |
No edit summary |
||
Line 609: | Line 609: | ||
// Reset function | // Reset function | ||
$('.reset-filter').click(function() { | $('.reset-filter').click(function(event) { | ||
event.stopPropagation(); // Prevent event bubbling | |||
// Remove 'active' class from all filter buttons | // Remove 'active' class from all filter buttons | ||
$('#filters .values button').removeClass('active'); | $('#filters .values button').removeClass('active'); | ||
$('.open-filter').removeClass('active-filter'); | $('.open-filter').removeClass('active-filter'); | ||
// Show all cards that might have been hidden by the filters | // Show all cards that might have been hidden by the filters | ||
$('.card').show(); | $('.card').show(); | ||
// Reset and hide the filter counts | // Reset and hide the filter counts | ||
$('.count-filtered-cards').text('').hide(); | $('.count-filtered-cards').text('').hide(); | ||
filterCards(); | |||
// Update other UI elements as needed, excluding the general toggle button | |||
updateLastVisibleCard(); | updateLastVisibleCard(); | ||
updateWidthBlockView(); | updateWidthBlockView(); |