• Resolved andymiller

    (@andymiller)


    Hi

    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?

    Thanks.

    https://wordpress.org/plugins/use-google-libraries/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter andymiller

    (@andymiller)

    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_deregister_script(‘jquery’);
    wp_register_script(‘jquery’, “http” . ($_SERVER[‘SERVER_PORT’] == 443 ? “s” : “”) . “://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js”, false, null);
    wp_enqueue_script(‘jquery’);
    }

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

    Thanks again – sorry if these are daft questions.

    Plugin Author Jason Penney

    (@jczorkmid)

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using with non WordPress jquery scripts’ is closed to new replies.