JS error
-
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:592I 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’, (“https://code.jquery.com/jquery-latest.min.js”), false, ”);
wp_enqueue_script(‘jquery’);
}No help there. Can anyone else help?
- The topic ‘JS error’ is closed to new replies.