i need your help, trying to change image source by class clicking button butnit returns error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

i need your help, trying to change image source by class clicking button butnit returns error

https://code.sololearn.com/WnDrpVXp4dNW/?ref=app

10th Nov 2018, 9:41 AM
Giorgi Macharashvili
Giorgi Macharashvili - avatar
4 Answers
+ 3
Yout script are running before the html element are created, run your script after the page loaded window.onload = function(){ //your code }
10th Nov 2018, 10:51 AM
Taste
Taste - avatar
+ 2
No sweat. Thanks for understanding. 😊
10th Nov 2018, 11:18 AM
Janning⭐
Janning⭐ - avatar
+ 1
thanks
10th Nov 2018, 11:05 AM
Giorgi Macharashvili
Giorgi Macharashvili - avatar
+ 1
sorry for this
10th Nov 2018, 11:06 AM
Giorgi Macharashvili
Giorgi Macharashvili - avatar