MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 608: Line 608:
     }
     }


     // Reset function
     // Reset function to remove active filters
     $('.reset-filter').click(function(event) {
     $('.reset-filter').click(function(event) {
         event.stopPropagation(); // Prevent event bubbling
         event.stopPropagation(); // Prevent event bubbling
Line 614: Line 614:
         // 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');
        // Show all cards that might have been hidden by the filters
         $('.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();
         filterCards(); // Reapply filtering based on the updated active buttons


         // Update other UI elements as needed, excluding the general toggle button
         // Update other UI elements as needed, excluding the general toggle button

Navigation menu