WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. JeremyEnglert
    Member
    Posted 1 year 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 1 year ago #

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

    http://codex.wordpress.org/Conditional_Tags#The_Administration_Panels

    with !is_admin

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.