• Only happened after I upgraded WordPress to the latest version 5.5.1 and the plugin version to 2.1.
    (was working on localhost with previous versions of both).

    I am using the plugin like this:

    echo '<a class="xoo-el-action-sc xoo-el-login-tgr" style="display:inline-block;"><span class="footerlogin">Login</span></a><span class="loginseperator"> | </span><a class="xoo-el-action-sc xoo-el-reg-tgr" style="display:inline-block;"><span class="footerregister">Sign up</span></a>';

    (using the classes xoo-el-login-tgr and xoo-el-reg-tgr to initiate pop-up in HTML)

    When I click on Login I get the following error in jQuery (and the plugin fails to work/pop-up)

    jquery.js?ver=1.12.4-wp:2 Uncaught Error: Syntax error, unrecognized expression: [href=#]

    in chrome javascript console.

    Seems to be an error with an older version of jQuery and not being a valid href link?

    Are the plugin developers aware of this and is there a fix?

Viewing 1 replies (of 1 total)
  • Thread Starter bbruman

    (@bbruman)

    Google’d the error and found this link here referencing the unrecognized expression: [href=#]

    After adding the following function the plugin works properly and pops up with the login form. (note I do not have the theme I was just googling the javascript error)

    add_action( 'wp_enqueue_scripts', 'load_old_jquery_fix', 100 );
    
    function load_old_jquery_fix() {
        if ( ! is_admin() ) {
            wp_deregister_script( 'jquery' );
            wp_register_script( 'jquery', ( "//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js" ), false, '1.11.3' );
            wp_enqueue_script( 'jquery' );
        }
    }

    but I do not believe this is a proper fix

    • This reply was modified 5 years, 9 months ago by bbruman.
Viewing 1 replies (of 1 total)

The topic ‘jquery.js?ver=1.12.4-wp:2 – Syntax error, unrecognized expression: [href=#]’ is closed to new replies.