diff --git a/assets/js/index.js b/assets/js/index.js index e08d6ec..8f79514 100644 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -130,15 +130,13 @@ function pg_ctrl() { let n = i; button.textContent = "•"; //• not · pgctrl.appendChild(button); - } - if (pgctrl) - [].slice.call(pgctrl.children).forEach((m, n) => - m.addEventListener("click", function () { + + if (pgctrl) button.addEventListener("click", function () { reset(); slider_index = n; set(); }) - ); + } } function set() {