WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] JS error (2 posts)

  1. 420DankStank
    Member
    Posted 1 year ago #

    Hello!
    I am getting a javascript error. My widgets aren't moveable, screen options not clickable, etc. So I tried Script Debug, but that didn't work. Chrome says my error is Uncaught TypeError: Object [object Object] has no method 'on'.
    The error is in common.js on line 180. Line 180 says:

    menu.on('click.wp-submenu-head', '.wp-submenu-head', function(e) {

    If I click the arrow next to the Error on the console, it displays a few more errors:

    Uncaught TypeError: Object [object Object] has no method 'on' common.js:180
    (anonymous function) common.js:180
    e.resolveWith jquery.min.js:613
    e.extend.ready jquery.min.js:407
    c.addEventListener.C jquery.min.js:592

    I tried adding this code to my child theme functions.php file to make sure the theme is calling updated jquery:

    /**
    * Use latest jQuery release
    */
    if( !is_admin() ){
    wp_deregister_script('jquery');
    wp_register_script('jquery', ("http://code.jquery.com/jquery-latest.min.js"), false, '');
    wp_enqueue_script('jquery');
    }

    No help there. Can anyone else help?

  2. 420DankStank
    Member
    Posted 1 year ago #

    Also tried adding Use Google Libraries plugin. Didn't help.

Topic Closed

This topic has been closed to new replies.

About this Topic