Title: [Plugin: JQuery Mega Menu Widget] WP_enqueue_script was called incorrectly
Last modified: August 20, 2016

---

# [Plugin: JQuery Mega Menu Widget] WP_enqueue_script was called incorrectly

 *  Resolved [syndrael](https://wordpress.org/support/users/syndrael/)
 * (@syndrael)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-jquery-mega-menu-widget-wp_enqueue_script-was-called-incorrectly/)
 * Hello,
    I’m under WP3.3.2 and i’ve tried to install jqMegaMenu 1.3.8 With the
   options below in my wp-config.php file i get this error. define(‘WP_DEBUG’, true);//
   Enable Debug logging to the /wp-content/debug.log file define(‘WP_DEBUG_LOG’,
   true); // Disable display of errors and warnings define(‘WP_DEBUG_DISPLAY’, true);
 * Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not
   be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts,
   or init hooks. Please see Debugging in WordPress for more information. (This 
   message was added in version 3.3.) in E:\www\wp_pure\wordpress\wp-includes\functions.
   php on line 3587
 * In my mind it’s due to the constructor in the plugin after the first wp_enqueue_script:
   //
   Header styles add_action( ‘wp_head’, array(‘dc_jqmegamenu’, ‘header’) ); // Scripts
   wp_enqueue_script( ‘jquery’ ); wp_enqueue_script( ‘jqueryhoverintent’, dc_jqmegamenu::
   get_plugin_directory() . ‘/js/jquery.hoverIntent.minified.js’, array(‘jquery’));
   wp_enqueue_script( ‘dcjqmegamenu’, dc_jqmegamenu::get_plugin_directory() . ‘/
   js/jquery.dcmegamenu.1.3.4.min.js’, array(‘jquery’) );
 * Could you correct it ?
    Is it possible to register jquery for the footer ? Best
   regards from PAris,France S.
 * [http://wordpress.org/extend/plugins/jquery-mega-menu/](http://wordpress.org/extend/plugins/jquery-mega-menu/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [remix4](https://wordpress.org/support/users/remix4/)
 * (@remix4)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-jquery-mega-menu-widget-wp_enqueue_script-was-called-incorrectly/#post-2797404)
 * Thanks for the info and will look at updating in the next update.
 * In the meantime though this is only a “Notice” and will not affect how the plugin
   operates
 *  Thread Starter [syndrael](https://wordpress.org/support/users/syndrael/)
 * (@syndrael)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-jquery-mega-menu-widget-wp_enqueue_script-was-called-incorrectly/#post-2797406)
 * > In the meantime though this is only a “Notice” and will not affect how the 
   > plugin operates
 * That’s correct but i like clean code.. LOL.
    In the same time, could you modify
   the code in order to make possible to put jquery in footer. Before your plugin,
   my Jquery was queued in the footer but because your dynamic jquery javascript,
   jQuery must be queued in the header. Best regards S.
 *  [benmoreassynt](https://wordpress.org/support/users/benmoreassynt/)
 * (@benmoreassynt)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-jquery-mega-menu-widget-wp_enqueue_script-was-called-incorrectly/#post-2797428)
 * I’ve posted a patch [here](http://wordpress.org/support/topic/plugin-jquery-mega-menu-widget-patch-fix-for-notice-wp_enqueue_script-was-called-incorrectly?replies=1)
 *  Thread Starter [syndrael](https://wordpress.org/support/users/syndrael/)
 * (@syndrael)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-jquery-mega-menu-widget-wp_enqueue_script-was-called-incorrectly/#post-2797429)
 * Thank you, but it’s too late. I’ve changed this plugin.
    I hope it will be helpful
   for somebody else.. Best regards S.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: JQuery Mega Menu Widget] WP_enqueue_script was called incorrectly’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/jquery-mega-menu_e7e7e7.svg)
 * [JQuery Mega Menu Widget](https://wordpress.org/plugins/jquery-mega-menu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jquery-mega-menu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jquery-mega-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/jquery-mega-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jquery-mega-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jquery-mega-menu/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [syndrael](https://wordpress.org/support/users/syndrael/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-jquery-mega-menu-widget-wp_enqueue_script-was-called-incorrectly/#post-2797429)
 * Status: resolved