0
Why dont working
2 Answers
+ 1
It's a loading order issue:
By the time the js is loaded, the html isn't fully loaded yet, that's why the js code doesn't find the html element.
A way to solve it is to wrap the js inside
window.onload = () => {
// here goes your code...
}
âââ IF SOMETHING IS NOT WORKING please describe WHAT is not working, what error you get and how it is supposed to work/ look âââ
0
Thanks Lisa the code is working đ