.addEventListener() Won't Work

Ahh, thanks so the solution is to just make individual files for each page to avoid referencing non-existing elements

I’m happy I could help. You’re right that you’ll need to customise your script for each page. Unless you figure out how to combine all the pages into one and hide/show elements as they’re needed. Then you’ll be able to reference all of them from a single script.

1 Like