Is there any attribute to make the slider read-only ?
slider.disable(true);
and to enable it - slider.disable(false);