From d4a6b4037a79cdfb256e1f45c6cdae5a58c8fd78 Mon Sep 17 00:00:00 2001 From: lolabird Date: Fri, 10 Nov 2023 07:38:42 -0700 Subject: [PATCH] Move grid listeners back to original function --- script.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/script.js b/script.js index 9546c96..eede3a7 100644 --- a/script.js +++ b/script.js @@ -26,9 +26,7 @@ function createGrid() { for (let i = 0; i < gridArea; i++){ container.appendChild(grid.cloneNode(true)); } -} -function setGridListeners() { const gridItems = document.querySelectorAll(".grid"); gridItems.forEach((item) => { @@ -38,6 +36,7 @@ function setGridListeners() { gridSlider.addEventListener("input", getGridDimensions); } + function getGridDimensions() { numGrid = gridSlider.value; while (container.firstChild) { @@ -88,4 +87,4 @@ function rgbColor() { } createGrid(); -setGridListeners(); \ No newline at end of file +//setGridListeners(); \ No newline at end of file