<input type = "range" id = "rngIntro" min = "0" max = "5" value = "0">
document.getElementById("rngIntro").value = "0";
Here's a piece of my code that basically resets the rngIntro
HTML range slider. It changes the value of it when the function is called, but it leaves the physical slider at whatever value it was prior. So, if the slider was at the far right it would stay there even though the value does change to zero.
What can I do to fix this, is there a reset
I can call instead of .value = "0"
?
I've just found this out for jquery mobile they require a refresh for the visual styling. Here's what they say in this page:
"If you manipulate a slider via JavaScript, you must call the refresh method on it to update the visual styling."
That solved it for me.
$( ".selector" ).slider( "refresh" );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With