+ 5

Using image slider with js.

Please, what is wrong with my file? I really need help with it. https://code.sololearn.com/WF7FtPUiil2Q/?ref=app

15th Jun 2019, 9:58 AM
xpan
xpan - avatar
7 Answers
+ 3
That isn't array but Array, be careful! Then, there is another error : now is null. You have to create a main function to initialize all the variables you use, like this : var now ; function main() { now = document.getElementById("I don't remember!") ; } window.onload = main ; //then all other function, like prev and next
15th Jun 2019, 10:04 AM
Théophile
Théophile - avatar
+ 3
Theophile Thanks, but I dont understand what you mean by a main function to initialize all variables used
15th Jun 2019, 10:41 AM
xpan
xpan - avatar
+ 3
ok, have done that
15th Jun 2019, 10:43 AM
xpan
xpan - avatar
+ 3
what about now
15th Jun 2019, 10:43 AM
xpan
xpan - avatar
+ 3
Thanks, its already working in my browser. Thanks a lot.
15th Jun 2019, 10:54 AM
xpan
xpan - avatar
+ 2
Another problem The buttons are not working only the setInterval
15th Jun 2019, 1:47 PM
xpan
xpan - avatar
+ 2
now, its working
15th Jun 2019, 2:58 PM
xpan
xpan - avatar