4,554
edits
No edit summary |
No edit summary |
||
Line 156: | Line 156: | ||
event.stopPropagation(); // Prevent the event from bubbling up | event.stopPropagation(); // Prevent the event from bubbling up | ||
console.log('openModal called with:', cardElement); | console.log('openModal called with:', cardElement); | ||
var isRelatedArticle = $(cardElement). | var isRelatedArticle = $(cardElement).closest('.related-article').length > 0; | ||
console.log('Is this a related article?:', isRelatedArticle); | console.log('Is this a related article?:', isRelatedArticle); | ||
showArticleWrapper.css('display', 'block'); | showArticleWrapper.css('display', 'block'); |