Menu
I have a main js file. I would like to keep all my JS inside this.
I’m also loading content via AJAX or FETCH into my index.php page.
I get errors for my event listeners as my DOM elements are not on the page when the page is loaded.
Is there a way around this? Loading my JS into my page content loaded with fetch does not seem to work either.