I have a slider from 1 to 0.1.
I set the minimum and maximum and slider calculates the interval between numbers.
But now i need to use a set of numbers between 1/1, 1/2, … to 1/9. (e.g. 1, 0.5, 0.33, 0.25, …)
How can i make that ?
<div id="slider1" data-dojo-type="dijit.form.HorizontalSlider"
data-dojo-props='name:"horizontal1",
onChange:function(val){ dojo.byId("slider1input").value=dojo.number.format(val); },
maximum:1/9,
minimum:1/1,
showButtons:true,
discreteValues:9,
intermediateChanges:true,
style:{width:"400px"}
'>
Here is the modified example from the demo page:
So the slider accepts integer numbers and then transforms them into your fractions, see
onChangefunction.