<input type="range" value="5,17" />
If I try to change the value with $('input').val('8,20');
it doesn't change...
But on hidden inputs works:
<input type="hidden" value="s" />
<input type="range" value="5,17" />
If I try to change the value with $('input').val('8,20');
it doesn't change...
But on hidden inputs works:
<input type="hidden" value="s" />
I tried setting up a fiddle and it worked without problems.
http://jsfiddle.net/Z2B7Y/
Keep in mind that the
value
represents the numerical value, that's between themin
andmax
attributes. Trying to set it to8,20
it's not valid, because it's not a valid number and therefore doesn't make sense.If you want to set a floating point value you have to use the dot, e.g.
If you want to set instead the bounds of the range you have to change the properties, e.g.
Hope this helps.
The HTML5
<input type="range" />
does only handle one value betweenmin
andmax
attribute - e.g.:If you want to have the slide handle a min and a max value in one UI-input you could possibly use jQueryUI's slider: https://jqueryui.com/slider/#range