WordPress.org

Ready to get started?Download WordPress

Forums

Load newer JQuery version.. (3 posts)

  1. Knipple
    Member
    Posted 1 year ago #

    Im trying to load the latest version of jQuery (1.8.3) inside my theme. I`ve tried a few things including both of the following inside my themes header.php as follows:

    wp_enqueue_script('jquery','//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', true);

    Also tried to de-register jquery and register with new one as follows:

    wp_deregister_script('jquery');
    wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', true);

    And finally tried putting the following into functions.php :

    function my_enqueue_scripts() {
    	wp_deregister_script('jquery');
    	wp_register_script('jquery','http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js');
    	wp_enqueue_script('jquery');
    }
    
    add_action('wp_enqueue_scripts', 'my_enqueue_scripts');

    But no joy whatsoever so far.. Any help appreciated!

  2. Prasath Mani
    Member
    Posted 1 year ago #

    Hi Knipple,

    Try this

    wp_register_script ('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', array(), '1.8.3', true);

  3. Knipple
    Member
    Posted 1 year ago #

    Hi Prasath,

    Unfortunately that isnt working. Im checking which script is loading via Firebug and when i use enqueue etc it changes the order that jQuery loads but keeps loading 1.6.4 ...

    [No bumping. If it's that urgent, consider hiring someone.]

Topic Closed

This topic has been closed to new replies.

About this Topic