Let's now make an image slider. Suppose we have
an img
tag
in the HTML code:
<img id="slider" src="">
Let also we have an array of pictures:
let texts = ['1.png', '2.png', '3.png'];
Let's make it so that every second a new picture
from our array appears in the img
tag.
Implement the described slider. Make the images go in circles.
Modify the previous task so that forward and backward arrows also appear above the image. That is, the slider itself will be scrolled by the timer, but if desired, the user will also be able to scroll through it with links.