4,114
edits
No edit summary Tag: Manual revert |
No edit summary |
||
Line 12: | Line 12: | ||
// Insert the community featured element after the second card | // Insert the community featured element after the second card | ||
if (communityFeatured.length && filteredCards.length >= 2) { | |||
console.log("Community Featured element and at least two filtered cards found."); | |||
communityFeatured.detach(); | |||
filteredCards.eq(1).after(communityFeatured); | |||
communityFeatured.show(); | |||
console.log("Community Featured element has been moved after the second filtered card."); | |||
} else { | |||
if (!communityFeatured.length) { | |||
console.log("No Community Featured element found."); | |||
} | |||
if (filteredCards.length < 2) { | |||
console.log("Less than two filtered cards found. Found: ", filteredCards.length); | |||
} | |||
} | |||
// Check if the specific element exists on the page | // Check if the specific element exists on the page |