[Plugin: Multi-level Navigation Plugin] Enqueuing JavaScript
-
This is a great plugin that I’ve been using for years.
A couple of the scripts are not properly enqueued, which means that if you want to use a plugin such as JavaScript to Footer then jquery script gets put at the bottom and the jQuery settings for the pixopoint menu remain at the top and you get a JavaScript error that jQuery is not found.
There’s probably good reasons why they’re not, but it would be useful if that could be.
There are two problem files that I could find:
- core.php
- scripts\superfish_settings.js.php
The problem line in core.php is:
<!--[if lte IE 7]><script type="text/javascript" src="'.WP_PLUGIN_URL.'/multi-level-navigation-plugin/scripts/suckerfish_ie.js"></script><![endif]-->I guess the conditional comment is a problem for enqueuing the suckerfish script, but this post (http://kuttler.eu/post/wordpress-style-version-conditional-comments/) seems to suggest its possible for enqueue_styles, so something similar might work for enqueue_scripts. I found that as a Resource link near the bottom of the WordPress wp_enqueue_style function reference page.
Not sure why the scripts\superfish_settings.js.php file can’t be linked to in a script src attribute rather than being pushed directly into the page. If that was done then it could be enqueued properly.
http://ww.wp.xz.cn/extend/plugins/multi-level-navigation-plugin/
The topic ‘[Plugin: Multi-level Navigation Plugin] Enqueuing JavaScript’ is closed to new replies.