4,092
edits
No edit summary Tag: Reverted |
No edit summary Tag: Manual revert |
||
Line 492: | Line 492: | ||
function toggleImage() { | function toggleImage() { | ||
currentIndex = (currentIndex + 1) % totalImages; | |||
var image = images[currentIndex]; | |||
console.log("Toggling to image index:", currentIndex, "Src:", image.src); | |||
$('#article-content').find('.article-images').html(getImageHtml(image, currentIndex, totalImages)); | |||
} | |||
// Updated event binding | // Updated event binding | ||
$('#article-content').on('click', '.image-container img', function () { | $('#article-content').on('click', '.image-container img', function () { |