We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 778f73d commit f701601Copy full SHA for f701601
static/js/banner.js
@@ -3,9 +3,11 @@ let timerCarousel;
3
let carouselImgs;
4
5
function advanceCarousel() {
6
- carouselImgs[currImgIndex].style.display = "none";
+ let adjCurrImgIndex = (currImgIndex % 2 === 0) ? 0 : currImgIndex;
7
+ carouselImgs[adjCurrImgIndex].style.display = "none";
8
currImgIndex = ++currImgIndex % carouselImgs.length;
- carouselImgs[currImgIndex].style.display = "block";
9
+ adjCurrImgIndex = (currImgIndex % 2 === 0) ? 0 : currImgIndex;
10
+ carouselImgs[adjCurrImgIndex].style.display = "block";
11
}
12
13
function onClickHandlerAdvance() {
0 commit comments