• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

SuperFish broken with JQuery 1.9+

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › SuperFish broken with JQuery 1.9+

This topic is: not resolved

Tagged: jquery, menus, Superfish

  • This topic has 4 replies, 4 voices, and was last updated 9 years, 10 months ago by JM_Cook.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • January 17, 2013 at 4:27 am #12587
    jstuartj
    Member

    Just in case some of you run into the same problem,  I just updated  a plug-in that was en-queuing  jQuery 1.9.0,  which no-longer supports $.broswer therefore  breaking  Superfish.js.   [It's looking for:  $.brower.msie ]

    The quick solution is to  add the query-migrate-1.0.0.min.js  plug-in which enables legacy browser sniffing. Hopefully superfish will be updated or replaced before WordPress updated its included version of jQuery.

    jQuery Core 1.9 Upgrade Guide
    jQuery.browser() removed
    The jQuery.browser() method has been deprecated since jQuery 1.3 and is removed in 1.9. If needed, it is available as part of the jQuery Migrate plugin. We recommend using feature detection with a library such as Modernizr.

    I added a js folder dropped the jQuery migrate plug into it and add the following to my function file.

    /** Add JQuery Migrate to Genesis child theme */

    add_action('wp_enqueue_scripts', 'bugfix_add_jquery_migrate');
    function bugfix_add_jquery_migrate(){
    if (!is_admin()) {
    wp_register_script( 'jquery-migrate', get_stylesheet_directory_uri() . '/js/jquery-migrate-1.0.0.min.js', array('jquery'));
    wp_enqueue_script( 'jquery-migrate');
    }
    }

    January 17, 2013 at 10:59 am #12646
    sheilab
    Participant

    Thanks so much for this.

    I added the js folder with the query-migrate-1.0.0.min.js file at the same level as  function.php in my theme and I am getting this parse error with the code I cut and pasted into my functions.php file. Please advise.
    Parse error: syntax error, unexpected T_DNUMBER in /home/bergman2/luvnbitsnparts.com/wp-content/themes/venture/functions.php on line 32

    /** Add JQuery Migrate to Genesis child theme */

    add_action(‘wp_enqueue_scripts’, ‘bugfix_add_jquery_migrate’);
    function bugfix_add_jquery_migrate(){
    if (!is_admin()) {
    wp_register_script( ‘jquery-migrate’, get_stylesheet_directory_uri() . ‘/js/jquery-migrate-1.0.0.min.js’, array(‘jquery’));
    wp_enqueue_script( ‘jquery-migrate’);
    }
    }

    January 17, 2013 at 6:30 pm #12759
    jstuartj
    Member

    Looks like something is changing single quotes to curly quote when I copy and pasted to the form... to my editor, you might check that, it happened in WeBuilder 2014 but note Notepad++. Let me try again in code tags maybe that will help.

    Is there a way to edit posts? I would like to fix the above but I'm not finding away.

    add_action('wp_enqueue_scripts', 'bugfix_add_jquery_migrate');
    function bugfix_add_jquery_migrate() {
        if (!is_admin()) {
        wp_register_script( 'jquery-migrate', get_stylesheet_directory_uri() . '/js/jquery-migrate-1.0.0.min.js',array('jquery'));
        wp_enqueue_script( 'jquery-migrate');
        }
    }
    
    February 1, 2013 at 12:16 am #17002
    kylehufford
    Member

    My site http://www.vanburenpubliclibrary.org should have the fancy drop downs and I have tried your fix with no luck. I just started on this site yesterday so it's not a situation where the drop downs ever worked. Thanks.

    May 1, 2013 at 10:20 pm #38874
    JM_Cook
    Member

    Are there any plans to update the version of Superfish which is included with Genesis or does that create other problems?

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble