SP-Slider Question

On the Spectrum UXP Reference Docs it shows some code to responding to slider events

document.querySelector(".yourSlider").addEventListener(“input”, evt => {
console.log(New value: ${evt.target.value});

Is the (".yourSlider") referring to the id of the slider.

I am getting this error when debugging the plugin
Cannot read property ‘addEventListener’ of null

The dot is associated with the class-attribute, for an id it would be querySelector("#yourID")

1 Like

#MyID worked after I fixed my typo in the spelling :grinning:

Cheers Simon