How can I have a jQuery slider that is readonly? One that would display a value but the user wouldn't be allowed to move it?
Thanks
How can I have a jQuery slider that is readonly? One that would display a value but the user wouldn't be allowed to move it?
Thanks
You would simply have to do this:
$('#mySlider').slider( 'disable' );
The documentation says there's a .slider('disable')
function - not sure what that actually does to the slider element itself, but that may be an option for you.
I have got the same issue that the slider disappears if I use directly $('#mySlider').slider( 'disable' );. I have loaded the slider fisrt..then disabled it. Though it is not a good way, but it works for me.
$('#mySlider').slider(
{
range: "min",
min: 0,
max: 100,
value: $("span", this).text(),
}
});
$('#mySlider').slider( 'disable');