How can i make carousel automatic | Sololearn: Learn to code for FREE!

+12

How can i make carousel automatic

I can make manual carousel with button but I want to make it automatic like a slideshow.

3/24/2020 1:58:46 AM

ツSampriya😘ツ

4 Answers

New Answer

+2

For example, you have a button to move carousel to right, ok? But that button is clicked by user. Well you can make it a function and put into a setInterval

+1

You can use setInterval , that executes a code every so often. javascript docs https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval or you also can use CSS animations https://www.w3schools.com/css/css3_animations.asp

+1

Plz tell in detail how to set interval

0

https://m.youtube.com/watch?v=kOcFZV3c75I