DOM Readiness in Javascript
Too Long; Didn't Read
The Javascript is loading before the DOM, so it is not ready to attach events to your HTML. This is a pretty common problem related to DOM readiness - your HTML isn't ready to have Javascript applied to it. If you want to wait for the DOM to load, then try using `DOMContentLoaded`. That means you can continue to have your Javascript before your HTML, and encounter no issues. Of course, you can also solve this problem by putting your Javascript **after** your HTML - but this is not always possible.