I
I
Ilya Olovyannikov2020-10-14 11:14:50
JavaScript
Ilya Olovyannikov, 2020-10-14 11:14:50

How to switch slides on click?

There is a carousel slider on js without libraries (this is important):
https://codepen.io/Olovyannikov/pen/QWEjwQW

We need to associate controls with slides so that slides switch when clicked.
Now automatic switching (setInterval) and comparison of the button index with the slide index are implemented - if they match, then the active modifier, if not, then not the modifier.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Mikhailov, 2020-10-14
@Psixodelik

If you don't need JS for this, then see the CSS Tricks article . I'd rather google than ask

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question