JqueryUI Slider disable dragging and allow click on ui-slider
My purpose is: Allow user click on slider and ui-handle will jump to that point and i can get value at that point, but do not allow user dragging the ui-handle. In my code below, i trying to return false at slide function of slider to prevent user drag but i can not click on slider, second method that i use is set disabled to true and then i can not do anything on slider. Please give me some suggestion. Thanks in advance !
- $('.bar_blue', slide).slider({
- step: 0.001,
- max: 100,
- start: function slider_start(event, ui) {
- video.media.pause();
- },
- slide: function slider_slide(event, ui) {
- return false; // this code not allow to dragging
- },
- stop: function slider_stop(event, ui) {
- console.log('stop', ui.value); // but value here
-
- },
- });