Skip to content

Commit

Permalink
index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rohityadav74 authored Sep 26, 2023
1 parent 9fa6edf commit b70d898
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// explore India javascript

const covers = document.querySelectorAll('.cover');
let currentIndex = 0;

function showNextCover() {
covers[currentIndex].classList.remove('active');
currentIndex = (currentIndex + 1) % covers.length;
covers[currentIndex].classList.add('active');
}
setInterval(showNextCover, 3000); // Change cover every 3 seconds

0 comments on commit b70d898

Please sign in to comment.