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 cards = $('.card');
     var cards = $('.card');
    var filteredCards = $('.filtered-list-item');
     var showArticleWrapper = $('#show-article-wrapper');
     var showArticleWrapper = $('#show-article-wrapper');


     if (communityFeatured.length && cards.length >= 2) {
     if (communityFeatured.length && filteredCards.length >= 2) {
         // Detach and insert the community featured element after the second card
         // Detach and insert the community featured element after the second card
         communityFeatured.detach();
         communityFeatured.detach();
         cards.eq(1).after(communityFeatured);
         filteredCards.eq(1).after(communityFeatured);


         // Show the community-featured element after positioning it
         // Show the community-featured element after positioning it

Navigation menu