14 lines
No EOL
420 B
JavaScript
14 lines
No EOL
420 B
JavaScript
function initializeSlider() {
|
|
const slider = document.getElementById("countSlider");
|
|
const display = document.getElementById("sliderValueDisplay");
|
|
|
|
display.innerText = slider.value;
|
|
slider.addEventListener("input", function () {
|
|
display.innerText = this.value;
|
|
});
|
|
}
|
|
|
|
function getSliderValue() {
|
|
const slider = document.getElementById("countSlider");
|
|
return parseInt(slider.value);
|
|
} |