4,554
edits
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
Line 119: | Line 119: | ||
function positionAndShowCommunityElement(communityElement, positionSelector, positionIndex) { | function positionAndShowCommunityElement(communityElement, positionSelector, positionIndex) { | ||
console.log("Positioning community element"); | |||
communityElement.detach(); | communityElement.detach(); | ||
var targetPosition = $(positionSelector + ' .card').eq(positionIndex); | var targetPosition = $(positionSelector + ' .card').eq(positionIndex); | ||
if(targetPosition.length === 0) { | |||
console.log("Target position not found. Selector or index might be incorrect."); | |||
return; | |||
} | |||
communityElement.insertAfter(targetPosition); | communityElement.insertAfter(targetPosition); | ||
communityElement.hide().fadeIn(); | |||
console.log("Community element should now be visible after", targetPosition); | |||
} | } | ||
// Event delegation for filter changes in block view | // Event delegation for filter changes in block view |