profile / app /static /js /carousel.js
SudoRanjith's picture
initial commit
2566e93
raw
history blame contribute delete
234 Bytes
let index = 0;
const carousel = document.getElementById("carousel");
const images = carousel.children;
setInterval(() => {
index = (index + 1) % images.length;
carousel.style.transform = `translateX(-${index * 100}%)`;
}, 3000);