MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 31: Line 31:
     }
     }
      
      
     // Listen for clicks on filter elements
     // Attach a click event handler to all elements with class 'filtered-value-option-label'
     $('.filtered-value-option-label').on('click', function() {
     $('.filtered-value-option-label').on('click', function() {
         // Hide the community list featured section when a filter is clicked
         // Hide the community list featured section when a filter is clicked
Line 37: Line 37:
     });
     });


     // Optional: Code to show the community list featured again when filters are cleared
     // Optional: Attach a click event handler to a 'clear filters' button
     // Replace '.clear-filters' with the correct selector for your clear filter button
     // Replace '.clear-filters' with the selector for your clear filter button
     $('.clear-filters').on('click', function() {
     $('.clear-filters').on('click', function() {
        // Show the community list featured section when filters are cleared
         communityListFeatured.show();
         communityListFeatured.show();
     });
     });

Navigation menu