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

    I am not sure whether it is possible or not but can jquery be pulled in from a cdn rather than have it in includes?

    regards,

    Jon

    #388687

    Hi Jon!

    Try the following:
    http://www.paulund.co.uk/load-jquery-cdn-with-wordpress

    Cheers!
    Josue

    #388725

    Hello,

    Thanks for the response.

    I know how to load JQuery via a cdn but I should have asked what effect this will have on the theme it-self should it be loaded externally and possibly in the footer of the page.

    regards

    Jon

    #388841

    Hey Jon!

    It shouldn’t have any effect if you do it the WordPress way:

    add_action( 'wp_enqueue_scripts', 'register_jquery' );
    function register_jquery() {
        wp_deregister_script( 'jquery' );
        wp_register_script( 'jquery', ( 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' ), false, null, true );
        wp_enqueue_script( 'jquery' );
    }

    Best regards,
    Josue

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.