Use Google Libraries
[resolved] Using with non WordPress jquery scripts (3 posts)

  1. andymiller
    Posted 1 year ago #


    I've been using the plugin and it works really well. Thank you.

    I'm thinking about installing Swipebox which doesn't have a wordpress plugin. I was thinking about using the method described in the Dave Ward article to get jquery from the Google CDN.

    If I did that would there be any conflict with the plugin? Should I deactivate the plugin?



  2. andymiller
    Posted 1 year ago #

    EDIT (except that I can't edit my post). Googling around it looks like I'd need to amend the functions.php, along the lines of:

    if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
    function my_jquery_enqueue() {
    wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", false, null);

    Does this in effect replace what the plugin does? Does the plugin do this anyway?

    Thanks again - sorry if these are daft questions.

  3. Jason Penney
    Plugin Author

    Posted 1 year ago #

    There's a lot of other information with the script registration besides just the URL. The plugin handles all of that. Also it doesn't just do jQuery itself, it does all the libraries it can, and uses the exact version that your WordPress install requires you to use.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Use Google Libraries
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.