soundar24 / roundSlider

roundSlider - A free jQuery plugin
https://roundsliderui.com/
MIT License
267 stars 80 forks source link

Detect if the slider is being dragged #112

Closed allan-simon closed 3 years ago

allan-simon commented 3 years ago

my use case:

I would, when inactive, that every 5 seconds, the slider change a bit its value to demonstrate to the user the value can change I can easily do that by adding a timer and programmatically changing the value

however I don't want it to happen when the user is actually moving manually the slider

is there a way to detect this ?

soundar24 commented 3 years ago

@allan-simon I am not sure where this use case will be used.. but you can easily detect whether the slider is dragged or not from the start and stop events.. these events will be triggered when the user starts to drag the handle and releases.. so at that time you can enable a flag to keep this status.. based on that flag status you can change the slider value in a periodical interval..

Check the below demo and let me know your comments:

https://jsfiddle.net/soundar24/ct31q7v5/

soundar24 commented 3 years ago

@allan-simon Feel free to re-open this if you are facing any issues still.