• Hello! I’m working on learning WP on my localhost, and I’m having a problem including a jQuery-dependent JavaScript on a page. I think I’ve followed the Codex instructions to the letter; here is an excerpt from my functions.php.

    function addMyScripts()
    {
    	wp_register_script(
    						'clever-dl',
    						get_template_directory_uri() . '/js/clever-dl.js',
    						array( 'jquery' ),
    						'20101009.5',
    						true
    						);
    	wp_enqueue_script( 'clever-dl' );
    
    }
    add_action( 'wp_enqueue_scripts', 'addMyScripts' );

    The page seems to render fine, with the right paths to the right scripts in the right places, but Firebug is telling me that jquery is not found when it tries to run my JS. =8-0

    Any suggestions? Thanks in advance for any help!

  • The topic ‘"jquery not found" with wp_register_script, wp_enqueue_script’ is closed to new replies.