onSlideStart event ?
Hi, thank you for the plugin it's really awesome!
There are some situation where we need the onSlideStart event and I think it make sense to have that kind of event as onSlideEnd already exists.
Thanks again, keep the great work.
@jimchild49 what exactly would you handle in a onSlideStart event? Do you have a specific example? I'm asking because you could probably use the native input event for that.
@andreruffert the idea basically is that you need to change the css style of an element with a specific class that will get added and removed many times from the page (after rangeslider get initialized), in this case you are obligated to put the element you are looking to modify in your onSlide event :
onSlide: function(){
$(".element_to_find").css("font-size", value);
}
Here jQuery will traverse the DOM to find that element again and again while you keep sliding... that's fine here but I had a use case where the sliderange becomes so slow, so I thought maybe I can set the element at 'onSlideStart' which doesn't exists yet
var element = null;
onSlideStart: function(){
element = $(".element_to_find");
},
onSlide: function(){
element.css("font-size", value);
}
That was my Idea, but I was able to solve it using onSlideEnd like this :
var element = null;
onSlide: function(){
if(element === null){
element = $(".element_to_find");
}
element.css("font-size", value);
}
onSlideEnd: function(){
element = null;
},