MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 4: Line 4:
     var communityFeatured = $('#community-featured');
     var communityFeatured = $('#community-featured');
     var communityListFeatured = $('#community-list-featured');
     var communityListFeatured = $('#community-list-featured');
    console.log("Community List Featured found:", communityListFeatured.length > 0);
     var cards = $('.card');
     var cards = $('.card');
     var filteredCards = $('.filtered-list-item');
     var filteredCards = $('.filtered-list-item');
Line 31: Line 32:
     }
     }
      
      
     // Attach a click event handler to all elements with class 'filtered-value-option'
     // Attach a click event handler to all elements with class 'filtered-value-option-label'
     $('.filtered-value-option').on('click', function() {
     $('.filtered-value-option-label').on('click', function() {
        console.log("Filter clicked");
         // Hide the community list featured section when a filter is clicked
         // Hide the community list featured section when a filter is clicked
         communityListFeatured.hide();
         communityListFeatured.hide();
        console.log("Community List Featured should now be hidden");
     });
     });


Line 40: Line 43:
     // Replace '.clear-filters' with the 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() {
        console.log("Clear filters clicked");
         // Show the community list featured section when filters are cleared
         // Show the community list featured section when filters are cleared
         communityListFeatured.show();
         communityListFeatured.show();
        console.log("Community List Featured should now be visible");
     });
     });


Navigation menu