+ 2
Classlist of null error on JS
I wrote a broken script long time ago and I thought I should post it here for help. When you play the game and click on it, the function jump isnt working https://code.sololearn.com/WfzBsC8On6E5/?ref=app
7 ответов
+ 4
1. Move the onclick to the body tag, not the html tag.
2. Wrap your initializing code in a;
document.onload = ()=> { ... code here ...}
So that the DOM is built when the objects are created.
+ 1
Without posting the code, it's not possible to provide a solution.
+ 1
Try to attach a link to your code, maybe it can describe the issue better. I find your Description to be rather vague and unclear contextually
"when you play the game"
What game?
"and click on it"
Click on what;
"the function jump isn't working"
What function? there is no code to view.
Maybe it's time for practicing mind reading for me.
+ 1
Ipang, there. I editted it.
+ 1
See the explanation in below post https://www.sololearn.com/post/90825/?ref=app
I didn't see the code when I was writing the response, sorry, intended no offense.
0
Ph frick, I forgot
0
There we go