Hello,
I am not aware of any incompatibility between the plugin and WP 5.3. On my test website everything seems to be working alright.
Do you have a link so I could have a look?
Thread Starter
pickme
(@pickme)
Yes
I get TypeError: $ is not a function for several codes.
I am not getting this error with WP 5.2.4
-
This reply was modified 6 years, 6 months ago by
pickme.
-
This reply was modified 6 years, 6 months ago by
pickme.
You can fix the errors by replacing the $. with jQuery. in the codes.
For example, the following code:
$(document).ready(function() {
$(".nav-menu-mobile").find("a").on("click", function(e){
$("a.hamburger-icon.toggle-mobile-menu").trigger("click");
});
});
needs to be rewritten as follows:
jQuery(document).ready(function($) {
$(".nav-menu-mobile").find("a").on("click", function(e){
$("a.hamburger-icon.toggle-mobile-menu").trigger("click");
});
});
Here is an article about “compatibility mode” for jQuery in WordPress.
The issue has nothing to do with the Simple Custom CSS and JS plugin per se. It has to do with the wrong use of the jQuery library in WordPress.
-
This reply was modified 6 years, 6 months ago by
SilkyPress.
Thread Starter
pickme
(@pickme)
Thank you for your help Diana!
It did work!
Nothing to do with Simple Custom CSS and JS.
-
This reply was modified 6 years, 6 months ago by
pickme.