+ 3

Javascript toggle 3

On line twelve I dont know what is wrong it says it is wrong in the output https://code.sololearn.com/WpxujQ8dZ5NE/?ref=app

13th Mar 2019, 11:16 AM
Gavin Macpherson
Gavin Macpherson - avatar
3 odpowiedzi
+ 6
I believe this is actually what you want. The main thing was that the code should have been changing slider.src and not back.src. The code in the click event handler should be wrapped as a function (this was giving you the string to guid error). As for num++ % back.length, it's just a trick to replace the if statement. https://code.sololearn.com/W0L9sWdv7Q38/?ref=app
13th Mar 2019, 12:27 PM
Hatsy Rei
Hatsy Rei - avatar
+ 7
You missed a closing bracket } for your if statement. Add one on line 14. Also, remove the semicolon on line 12.
13th Mar 2019, 11:37 AM
Hatsy Rei
Hatsy Rei - avatar
+ 4
Pictures dont work either
13th Mar 2019, 11:54 AM
Gavin Macpherson
Gavin Macpherson - avatar