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


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


4 Answers

New Answer


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


You can use setInterval , that executes a code every so often. javascript docs or you also can use CSS animations


Plz tell in detail how to set interval