SyntaxFix
Write A Post
Hire A Developer
Questions
The problem happened because I was trying to bind a HTML element before it was created.
My script was loaded on top of the HTML and it needs to be loaded at the bottom of my HTML code.