I’m trying to load a js file from the theme folder of WordPress – wp-content/themes/new/js/newfile.js – I need this to load after DOMContentLoaded, but I have no idea how to do this.
The JavaScript is currently not working, and I’ve been told it might work using DOMContentLoaded so it executes at the right time.
I’ve Googled this, but I couldn’t find a simple guide of how to do it.
Thanks in advance