Inline script error with minification plugin
-
This is for the plugin developers.
I use Better WP Minify and unless I exclude the soundmanagers-nodebug.jsmin.js from being minified, combined and moved to the footer, I get an error in the browser console that soundManager is undefined.
There are a few ways to overcome this, which may be combined for best results:
- Enqueue the code that is currently used inline. Other than setting one URL, I see no reason for this to be inline
- Make the code run on window load, by which time all the JavaScript sources will have run
- Set the priority of the action that writes the inline code to a high number, like 999, so that it appears further down the page than the minified scripts
Thank you!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Inline script error with minification plugin’ is closed to new replies.