Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus ad amet consectetur exercitationem fugiat in ipsa ipsum, natus odio quidem quod repudiandae sapiente. Amet debitis et magni maxime necessitatibus ullam.
By setting js-name you can access slider in your js code. Remember to use it in your code after the page has loaded.
/* Example */window.onload=slider;functionslider(){letsliderText=document.getElementById('sliderText');slider1.on('update',function(values,handle){sliderText.innerHTML=values[handle];});}
start
The start option sets the number of handles and corresponding start positions.
The start option uses the slider’s 'format' option to decode the input. Number input will be cast to string and decoded.
range
All values on the slider are part of a range. The range has a minimum and maximum value. The minimum value cannot be equal to the maximum value.
step
By default, the slider slides fluently. In order to make the handles jump between intervals, you can use the step option.
connect
The connect option can be used to control the bar between the handles or the edges of the slider.
If you are using one handle, set the value to either 'upper' or 'lower'.
For sliders with 2 or more handles, pass an array with a boolean for every connecting element, including the edges of the slider. The length of this array must match the handle count + 1.
Setting true sets the bars between the handles, but not between the handles and the sliders edges.
margin
When using two handles, the minimum distance between the handles can be set using the margin option. The margin value is relative to the value set in ‘range’. This option is only available on linear sliders.
limit
The limit option is the oposite of the margin option, limiting the maximum distance between two handles. As with the margin option, the limit option can only be used on linear sliders.
padding
Padding limits how close to the slider edges handles can be.
That’s only the basic features and options of range slider. More possibilities can be found here.