4,554
edits
No edit summary |
No edit summary |
||
Line 152: | Line 152: | ||
} | } | ||
// Function to open the modal and adjust the list | |||
function openModal(cardElement) { | function openModal(cardElement) { | ||
console.log(' | console.log('openModal called with:', cardElement); | ||
var isRelatedArticle = $(cardElement).hasClass('related-article'); | var isRelatedArticle = $(cardElement).hasClass('related-article'); | ||
console.log('Is this a related article?:', isRelatedArticle); | |||
showArticleWrapper.css('display', 'block'); | showArticleWrapper.css('display', 'block'); | ||
var wrapperWidth = showArticleWrapper.outerWidth(true); | var wrapperWidth = showArticleWrapper.outerWidth(true); | ||
console.log('Wrapper width:', wrapperWidth); | |||
var adjustment = 25; // Adjust this value as needed to close the gap | var adjustment = 25; // Adjust this value as needed to close the gap | ||
list.width(originalListWidth - wrapperWidth + adjustment).css('margin-right', (wrapperWidth - adjustment) + 'px'); | list.width(originalListWidth - wrapperWidth + adjustment).css('margin-right', (wrapperWidth - adjustment) + 'px'); | ||
Line 180: | Line 182: | ||
var title = $(cardElement).find('.related-article-title').text(); | var title = $(cardElement).find('.related-article-title').text(); | ||
var type = $(cardElement).find('.related-article-type').text(); | var type = $(cardElement).find('.related-article-type').text(); | ||
console.log('Entry Number:', entryNumber); | |||
console.log('People:', people); | |||
console.log('Title:', title); | |||
console.log('Type:', type); | |||
// Update modal content for related-article | // Update modal content for related-article | ||
Line 287: | Line 294: | ||
// Apply the fade-out effect to both #list and #list-list elements | // Apply the fade-out effect to both #list and #list-list elements | ||
$('#list, #list-list').addClass('fade-out'); | $('#list, #list-list').addClass('fade-out'); | ||
// End of openModal | |||
} | } | ||
Line 354: | Line 363: | ||
}); | }); | ||
function setupImageToggle(images) { | function setupImageToggle(images) { |