MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 81: Line 81:
                 var initialImage = cardImages[0]; // Use the first image initially
                 var initialImage = cardImages[0]; // Use the first image initially
                 // Append the image HTML with the dynamic label
                 // Append the image HTML with the dynamic label
                 articleContentHtml += getImageHtml(initialImage, 0, cardImages.length); // Add current index and total
                 articleContentHtml +=  
                    '<div class="image-display-area">' +
                        getImageHtml(initialImage, 0, cardImages.length) +
                    '</div>';
             }
             }
              
              
Line 127: Line 130:
                 currentIndex = (currentIndex + 1) % totalImages;
                 currentIndex = (currentIndex + 1) % totalImages;
                 var image = images[currentIndex];
                 var image = images[currentIndex];
                 var articleImageContainer = $('#article-content');
                 var imageContainer = $('#article-content').find('.image-display-area');
                 articleImageContainer.html(getImageHtml(image, currentIndex, totalImages));
                 imageContainer.html(getImageHtml(image, currentIndex, totalImages));
             }
             }
          
          

Navigation menu