🤩 If you like this project, please support us by starring our GitHub repository 🤩

Add/Remove Pointer API

There is an API that allows to dynamically add or remove a slider pointer.

Let’s say we have the following slider:

<tc-range-slider id="slider-1"></tc-range-slider>

We can then add pointers using addPointer API:

const $slider1 = document.getElementById('slider-1');
$slider1.addPointer(30);
$slider1.addPointer(50);
$slider1.addPointer(70);

And we can remove the last pointer using removePointer API:

$slider1.removePointer();

📌 An example page with the source code can be found here.

Previous
Next.js
Next
Plugins