jQuery Conflicts in Admin Panel with Google CDN (2 posts)

  1. JeremyEnglert
    Posted 2 years ago #

    So I recently overode the default jQuery and used the Google CDN. However, now my Menu Manager is showing jQuery errors in the admin backend. Here is the code I'm using:

    //jQuery - Use Google CDN instead of WP jQuery
    function my_scripts_method() {
        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('init', 'my_scripts_method');

    Is there anyway to set that so it doesn't cause conflicts within the admin panel?

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    Just conditionalize it to not happen on admin side...


    with !is_admin

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.