I want when I press the increase or decrease button the range bar will move

help me
4 Replies
Chris Bolson
Chris Bolson3mo ago
What have you got so far? Share your code on a Codepen (or similar) so that it will be easier for somebody to help you.
Chris Bolson
Chris Bolson3mo ago
OK, you are nearly there. You just need to update the range slider "value" with the new value as defined when you click on the buttons. You already have this function:
function slidePrice(value) {
let progress = (value / max) * 100;
tooltip.innerHTML = "$" + value;
tooltip.style.left = progress + "%";
rangeSlide.style.background = ` #222e3c`;
}
function slidePrice(value) {
let progress = (value / max) * 100;
tooltip.innerHTML = "$" + value;
tooltip.style.left = progress + "%";
rangeSlide.style.background = ` #222e3c`;
}
Alter that function to also update the range slider value:
function slidePrice(value) {
let progress = (value / max) * 100;
tooltip.innerHTML = "$" + value;
tooltip.style.left = progress + "%";
rangeSlide.style.background = ` #222e3c`;
rangeSlide.value= value; // update range slider value
}
function slidePrice(value) {
let progress = (value / max) * 100;
tooltip.innerHTML = "$" + value;
tooltip.style.left = progress + "%";
rangeSlide.style.background = ` #222e3c`;
rangeSlide.value= value; // update range slider value
}
conmeomaunau
conmeomaunauOP3mo ago
thank you so much problem solved , thank you
Want results from more Discord servers?
Add your server