N
N
nikita17april2020-07-02 20:17:04
JavaScript
nikita17april, 2020-07-02 20:17:04

How to make a slider in pure JavaScript?

I have an array 5efe15e548d6f564317836.png.
I want to make the array move forward and each element of the array alternates the class with main_news.
It should be something like a slider.
How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arseny, 2020-07-03
@nikita17april

NodeList is not an array. This is NodeList. And it can be "twisted" in both directions by moving Node nodes (append \ prepend, etc.). It remains only to fasten the animation (for starters).
You can also convert to an array, and twist using arrays.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question