IonDen / ion.rangeSlider

jQuery only range slider
http://ionden.com/a/plugins/ion.rangeSlider/en.html
MIT License
2.56k stars 508 forks source link

ionRangeSlider data.step unreadable #770

Open Mijsoot opened 2 years ago

Mijsoot commented 2 years ago

Hi, I don't know it's normal or not but we can't access to the data.step value. Do i make a mistake anywhere ?

I made a CodePen to try here

Thanks in advance for your help

Mijsoot commented 2 years ago

Excuse me DENIS, first i want to thank you for this beautifull plugin ! I use it for the fist time but i found it excellent !

But don't you think it can be a bug or a forgetfulness? Because your API documentation does not specify anything special about STEP ?

Thanks in advance for your response

IonDen commented 2 years ago

Hi @Mijsoot. Step is a param you set from outside, that is why it is not visible in sliders telemetry.

Idea is this. If you need it - you could save it to variable and reuse later. Example:

let myStep = 100;
$(...).ionRangeSlider({
  step: myStep
});

// change step

myStep = 200;
sliderInstance.update({
  step: myStep
});

// in this case you will always have access to step as an external variable.
Mijsoot commented 2 years ago

Hi @IonDen , thank you for your response. Effectively i had found this, you can see it in my before example. But, i thunk that "data-step" could be readle like all others "data-...".

Thanks again for your response