0
Why dont working
2 Respostas
+ 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 🙏