Support » Fixing WordPress » WordPress jquery files not being enqueued

  • I just put my website on the Web and noticed that the menu is not really working.Nothing happens when I click on it and when Inspect the element s I actually don’t see the scripts. All works perfectly in the localhost though.

    Here my function.php:

    function scentology_scripts() {
    
            wp_enqueue_style( 'scentology-local-fonts', get_template_directory_uri() . '/fonts/raleway.css' );                   
    
            wp_enqueue_style( 'scentology-style-fontawesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css' );
    
        wp_enqueue_style( 'scentology-style', get_stylesheet_uri() );
    
    //        wp_enqueue_script( 'scentology-style', get_template_directory_uri() . '/js/scrollspy.js', array(jquery), '20151215', true );
    
            wp_enqueue_script( 'scentology-menu', get_template_directory_uri() . '/js/menu.js', array('jquery'));
            wp_enqueue_script( 'scentology-menu');
    
        wp_enqueue_script( 'scentology-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );
    
        wp_enqueue_script( 'scentology-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );
    
        if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
            wp_enqueue_script( 'comment-reply' );
        }
    }
    add_action( 'wp_enqueue_scripts', 'scentology_scripts' );

    and my jquery code:

    (function( $ ){
       $(".burguer-nav").on("click", function() {
            $("header nav ul").toggleClass("open");
        });
    })(jQuery);

    Is there another way for me to load the scripts?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘WordPress jquery files not being enqueued’ is closed to new replies.