[Solved] In vs code and sololearn desktop version my code is working but in mobile version not. Please help. Tnx | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

[Solved] In vs code and sololearn desktop version my code is working but in mobile version not. Please help. Tnx

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

30th Mar 2021, 2:48 PM
FrankoS
2 Answers
+ 3
Hey , your js code will run before the DOM even exist . so you need to wait the DOM is fully loaded then run The script . you can use window.onload = () => { // your code }
30th Mar 2021, 3:39 PM
Med Amine Fh
Med Amine Fh - avatar
0
Tnx now is everything OK.
30th Mar 2021, 4:29 PM
FrankoS