Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6158

    Hi

    Where in the Newscast theme are you exactly loading the jquery library?

    I know it’s calling the default library that ships with wordpress (/wp-includes/js/jquery/jquery.js?ver=1.6.1) but I can’t find the actual location.

    Ideally what I would like to do is comment that out and replace it with the call to jquery from the google library.

    I was looking for the wp_enqueue_script(‘jquery’); in the functions.php file but could not find it there OR in the header.php file.

    Thanks

    #53091

    Hey,

    there’s no need to comment out the code. Open up functions.php and add following code at the very bottom:

    //Making jQuery Google API
    function modify_jquery() {
    if (!is_admin()) {
    // comment out the next two lines to load the local copy of jQuery
    wp_deregister_script('jquery');
    wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js', false, '1.6.1');
    wp_enqueue_script('jquery');
    }
    }
    add_action('init', 'modify_jquery');

    #53092

    Thanks dude.

    Just out of curiosity where is the jQuery call in your code?

    #53093

    The script enqueue code can be found in newscastframeworkhelper_functionsheader_includes.php

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘LOAD JQUERY FROM THE GOOGLE AJAX LIBRARY’ is closed to new replies.