From fb16e481a46c0507606c5e5c03ede5ff91416202 Mon Sep 17 00:00:00 2001 From: Ayush Gaggar Date: Wed, 2 Oct 2024 13:54:27 -0500 Subject: [PATCH] basic slider changes --- index.html | 8 +++----- static/js/slider.js | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index e8963d8..c7546c3 100644 --- a/index.html +++ b/index.html @@ -225,15 +225,13 @@

Ours vs. FisherRF

- -
- +
]
- -->
diff --git a/static/js/slider.js b/static/js/slider.js index b23761a..f5c1c85 100644 --- a/static/js/slider.js +++ b/static/js/slider.js @@ -1,6 +1,6 @@ // Function to handle slider changes export function handleSliderChange() { - const sliderPos = imgSlider.target.value; + sliderPos = imgSlider.target.value; // Update the width of the foreground image document.querySelector('.foreground-img').style.width = `${sliderPos}%`; @@ -10,7 +10,7 @@ export function handleSliderChange() { } // Get the slider element and add event listeners for 'input' and 'change' -const imgSlider = document.getElementById("img-slider"); +const imgSlider = document.getElementById(".img-slider"); imgSlider.addEventListener("input", handleSliderChange); imgSlider.addEventListener("change", handleSliderChange);