diff --git a/static/script.js b/static/script.js index 459f784..ccb0115 100644 --- a/static/script.js +++ b/static/script.js @@ -68,7 +68,7 @@ function updateDots() { var dots = document.querySelectorAll("#dots .dot"); dots.forEach(function(dot, index) { // index starts at 0 so add FIRST_IMG_ID to match your slide IDs - dot.className = "dot" + ((index + FIRST_IMG_ID) === current ? " active" : ""); + dot.classList.toggle("active", (index + FIRST_IMG_ID) === current); }); } diff --git a/static/style.scss b/static/style.scss index a5ccac0..8ab257f 100644 --- a/static/style.scss +++ b/static/style.scss @@ -376,7 +376,7 @@ iframe { margin: 0 0.25em; cursor: pointer; - .active { + &.active { background: #333; } }