How to create auto image slider using javascript? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to create auto image slider using javascript?

I knew that how to create image slider using buttons in javascript. But i want that the images will automatically slide without any button. It should slide with some interval.

27th Mar 2017, 5:53 AM
Navneet Kumar
Navneet Kumar - avatar
4 Answers
+ 4
setTimeout (function (){window.location.href= "http://bfy.tw/A As1p" } , 1500)
27th Mar 2017, 5:58 AM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
+ 2
use setTimeout on your function slide next
27th Mar 2017, 5:54 AM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
+ 2
Use setInterval(function (){}, time in milliseconds) It executes in every interval that you provided as second parameter to setInterval function.
27th Mar 2017, 6:23 AM
Ashwani Kumar
Ashwani Kumar - avatar
+ 1
can you please elaborate it??
27th Mar 2017, 5:55 AM
Navneet Kumar
Navneet Kumar - avatar