jQuery on Underscores menu
You haven’t passed jquery as a dependency for your script, and you are using the dollar sign too, which is not directly supported in WordPress due to conflict. First, pass jQuery as a requirement while enqueuing your navigation.js: wp_enqueue_script( ‘themename-navigation’, get_template_directory_uri() . ‘/js/navigation.js’, array(‘jquery’), ‘20151215’, true ); Then, wrap your code in a self invoking … Read more