Md Mozahidur Rahman преди 1 година
родител
ревизия
562f6138e2
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      js/theme-settings.js

+ 3 - 3
js/theme-settings.js

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