yassine el khanboubi yassine el khanboubi - 3 months ago 16
Javascript Question

Events are not firing in JQuery ui Slider

i'm trying to use jquery-ui slider, but all events are not firing (i've tested the

change
and
slide
events), i've tried binding the events via
bind()
but nothing happens, here's my code :

HTML

<div class="widget-content-range">
<input class="passangers_range" value="0;5" name="passangers_range" />
</div>


JAVASCRIPT

$(".passangers_range").slider({
from:1,
to:5,
step:1,
dimension:'',
slide: function(event, ui) {
console.log(ui.value);
},
change: function(event, ui) {
console.log(ui.value);
}
});


any ideas please.

Answer

I finally got it, it turns out i had another script (jquery.slider.min - jquery slider plugin) which overrides the slider() function of jquery-ui framework and it uses the callback() function to detect the value change of the slider.

thank you very much

Comments