4,554
edits
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 && | 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(); | ||
filteredCards.eq(1).after(communityFeatured); | |||
// Show the community-featured element after positioning it | // Show the community-featured element after positioning it |