0
why this erorr Uncaught TypeError: Cannot set property 'className' of undifined Line 6
why this error can happen when this is exactly the same as in the example https://code.sololearn.com/W05OhQU2k4Kb/?ref=app and this is an example : https://codepen.io/SitePoint/pen/KzjpGj
2 Respostas
+ 4
Because your code runs prior to the webpage being loaded, slides is null. This adding onload function fixes it.
https://code.sololearn.com/Wdz7LE4T129V
+ 1
John Wells ok the code is working as I want thanks for helping me overcome this erorr