ion.rangeSlider
ion.rangeSlider copied to clipboard
disable the dragging of the slider. Only want to use for display
I am using ionrangeslider to display some temperature value. I like the way it displays.
I dont want the user to slide it. How can i disable the slider
I didnt find any option to diable dragging
this is the html and the js i am using
<input type="text" class="js-range-slider" name="my_range" value=""
data-min="40"
data-max="210"
data-from="115"
data-grid="true",
data-hide-min-max="true",
data-postfix="'F"
/>
$('.js-range-slider').ionRangeSlider()
Hi, you can't disable it through API. But you could do it via CSS. Like this:
.irs-from,
.irs-to,
.irs-single {
pointer-events: none;
}
If you want to block movement completely, you could use allowed range attributes, like this:
from_min: 115,
from_max: 115,
Check 2-nd demo here: http://ionden.com/a/plugins/ion.rangeSlider/demo_advanced.html#a_handles
thank you, this is what i was looking for
If you want to block movement completely, you could use allowed range attributes, like this:
from_min: 115, from_max: 115,
Check 2-nd demo here: http://ionden.com/a/plugins/ion.rangeSlider/demo_advanced.html#a_handles