javascript - Live output in jQuery HTML5 range slider -
I am trying to get a live output from an HTML5 input range slider in a JavaScript variable. > & Lt; Input type = "range" id = "rangevalue" onchange = "arduino ()" & gt;
The way I have to do this work, I am doing what I am doing, but it is not "live". I want to do this when you are pulling the slider, it updates the variable, and not only after you go. For example: When I'm pulling the slider from 1 to 5, I want to update the variable, when I'm pulling it will update with 1,2,3,4,5 and Not only jumping from 1 to 5 I leave the slider.
Is it possible to do this? Any recommendations? I was using jQuery slider plugin, but it was not touch compatible, which ended its purpose.
Thanks in advance for all help!
Edit - I should not have understood enough, I know how to get the value of the range slider, I want to get "live" output from it.
Or in plain JS:
var inp = document.getElementById ('rangevalue'); Inp.addEventListener ("mousemove", function () {document.getElementById ('text'). InnerHTML = this.value;}); < / Code>
Comments
Post a Comment