• SeizedPropaganda

    (@seizedpropaganda)


    I hope this is the right forum for this question. I’m trying to call the jQuery library provided by WordPress instead of registering and enqueueing one from the Google library and I seem to be having some issues.

    Here is the code I was using before in my functions.php file which calls jQuery just fine:

    if ( !is_admin() ) {
    	   wp_deregister_script('jquery');
    	   wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"), false);
    	   wp_enqueue_script('jquery');
    	}

    I’ve tried several different ways, including:

    add_action('wp_enqueue_scripts', 'my_enqueue_scripts');
    
    function my_enqueue_scripts() {
    
        wp_enqueue_script('jquery');
    }

    I’ve also tried calling it before wp_head() in my header file (which I know isn’t the ideal method, but I figured I’d try it anyway).

    I’m completely stumped. When I use my original code my superfish menu and other jquery dependent things work just fine, but when I try to use the WordPress jquery library nothing seems to work anymore.

    In case you were wondering why I’m trying to revert back to the WordPress jQuery library, I’m having issues with superfish and the SimplePress forum plugin and they were claiming the issue was from not using the jQuery library provided by WordPress.

    I’m obviously missing something here, so any help would be greatly appreciated.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Having trouble calling the WordPress jQuery library’ is closed to new replies.