|
@@ -14,11 +14,11 @@ window.onscroll = function () {
|
|
|
|
|
|
// const buttons = document.querySelectorAll("[data-carousel-button]")
|
|
// const buttons = document.querySelectorAll("[data-carousel-button]")
|
|
|
|
|
|
-document.querySelectorAll("[data-carousel-button]").forEach((button) => {
|
|
|
|
|
|
+document.querySelectorAll("[data-banner-slider-button]").forEach((button) => {
|
|
button.addEventListener("click", () => {
|
|
button.addEventListener("click", () => {
|
|
const offset = button.dataset.carouselButton === "next" ? 1 : -1;
|
|
const offset = button.dataset.carouselButton === "next" ? 1 : -1;
|
|
const slides = button
|
|
const slides = button
|
|
- .closest("[data-carousel]")
|
|
|
|
|
|
+ .closest("[data-banner-slider]")
|
|
.querySelector("[data-slides]");
|
|
.querySelector("[data-slides]");
|
|
|
|
|
|
const activeSlide = slides.querySelector("[data-active]");
|
|
const activeSlide = slides.querySelector("[data-active]");
|
|
@@ -32,7 +32,7 @@ document.querySelectorAll("[data-carousel-button]").forEach((button) => {
|
|
});
|
|
});
|
|
|
|
|
|
setInterval(function () {
|
|
setInterval(function () {
|
|
- if (document.querySelector(".carousel-button.next"))
|
|
|
|
|
|
+ if (document.querySelector(".carousel-button.next"))
|
|
document.querySelector(".carousel-button.next").click();
|
|
document.querySelector(".carousel-button.next").click();
|
|
}, 5000);
|
|
}, 5000);
|
|
|
|
|