0

Javascript slideshow doesn't work

So I tried to make a slideshow from scratch (note I'm new to javascript and coding overall). The logic from my drawings is in the code and to me it should work just like that. But I'm probably missing something. Basically what I want it to do: All slides are not visible show slide 1, wait a second hide slide 1, open slide 2, wait a second hide slide 2, open slide 3, wait a second " " hide slide 5, repeat. https://code.sololearn.com/W3A2224a14a1

20th Jan 2021, 5:57 PM
Samuel
Samuel - avatar
6 ответов
+ 2
https://code.sololearn.com/WI4n3kxR478X/?ref=app
20th Jan 2021, 9:47 PM
visph
visph - avatar
0
That doesn't solve my question, I specifically stated I wanted to make this in Javascript. @Kintu
20th Jan 2021, 6:35 PM
Samuel
Samuel - avatar
0
What may work better is appending each image to the dom per iteration. There are tons of resources on how you may go around doing this. The way I normally do it is make an array of image paths and loop through them. there are other ways to do this though, i will link a great tutorial on a way you can do this..
20th Jan 2021, 7:15 PM
Austin Cuddeback
Austin Cuddeback - avatar
20th Jan 2021, 7:17 PM
Austin Cuddeback
Austin Cuddeback - avatar
0
@visph Thanks a lot!!! It runs so smooth too :D But just for better understanding: I needed to use 'else' if statements and put the wait timer under all other js lines?As well as some better css to make it look better ofcourse! Thanks for your help, hope you have a great evening!
20th Jan 2021, 10:25 PM
Samuel
Samuel - avatar
- 1
Samuel try out bootstrap bootstrap is much more better than js
20th Jan 2021, 6:19 PM
🥇👩‍💻 Kintu Michael Evans 🔥🔥( Active)
🥇👩‍💻 Kintu Michael Evans 🔥🔥( Active) - avatar