W
W
Waniman2021-02-09 12:14:25
JavaScript
Waniman, 2021-02-09 12:14:25

How to swipe a slider in JS?

After many browsers stopped processing touch events for the mouse, the task of creating a swipe for the slider became more complicated. How can it be implemented manually without resorting to libraries?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Ineshin, 2021-02-09
@Waniman

Look towards the following events:

// самые современные 
pointerdown,
pointerup,
pointermove,

// для сафари и старых браузеров
touchstart,
touchend,
touchmove

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question