leongersen / noUiSlider

noUiSlider is a lightweight, ARIA-accessible JavaScript range slider with multi-touch and keyboard support. It is fully GPU animated: no reflows, so it is fast; even on older devices. It also fits wonderfully in responsive designs and has no dependencies.
https://refreshless.com/nouislider/
MIT License
5.69k stars 657 forks source link

At what point is the noUi-target class added to the Element? #1119

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello, I want to make the sliders usable for Form elements and I need to know at what point the noUi-target class is added to the root element. I can't find it.

leongersen commented 3 years ago

The noUi-target class is added when the slider is initialized.

ghost commented 3 years ago

Do you have a flowchart or similar for this? noUiSlider.create -> initialize -> calls scope -> calls setupSlider with no arguments -> calls addSlider -> add slider calls addClass functions that are appended to the root element that was provided when calling the noUiSlider.create function noUi-target noUi-ltr noUi-horizontal noUi-txt-dir-ltr -> calls addNodeTo the target element with css classes base.

Correct?

leongersen commented 3 years ago

Yes, the slider is initialized on create and that's when classes are added.

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.