• I have a custom jquery file, here is code:

    /* Custom JS */
    jQuery(document).ready(function(){
        jQuery("#top-menu li:first-child a").addClass('selected');
    });

    And here my code to load js file in functions.php

    add_action('wp_enqueue_scripts', 'load_custom_scripts');
    
    function load_custom_scripts(){
        wp_enqueue_script('custom_script', THEMEROOT.'/js/custom.js', array('jquery'), true);
    }

    But when i check with firebug, my js not found. Hope anyone tell me what’s wrong in my code?

    https://i.stack.imgur.com/iqGdQ.jpg

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WordPress custom jquery not found’ is closed to new replies.