wp_enqueue_script function not firing in time?
-
I used the function below to add some js for a custom menu. The menu dropdown ONLY works for logged-in users. The console for logged-out users tells me “jQuery is not defined”.
If I add the js via the Code snippets plugin (hooking into wp_footer) it fires just fine.
Any ideas whats going on here?
function activejs() { /*The active javascript for the menu functions*/ wp_enqueue_script( 'active_js', get_stylesheet_directory_uri() . '/assets/js/active.min.js', array(), '1.0.0', 'true' ); } add_action( 'wp_enqueue_scripts', 'activejs', 1);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp_enqueue_script function not firing in time?’ is closed to new replies.