Topic: jQuery.easing[jQuery.easing.def] + Worpdpress

Jo Stone pro asked 4 years ago


If you might have a look at my site here with the console open you won't see any problems initially. As soon as you click on the tabs the problems occur: "Uncaught TypeError: jQuery.easing[jQuery.easing.def] is not a function" + counting errors. The site runs on wordpress. I followed the guide here on implementinng MDB with Wordpress. If I remove JQUERY in my functions.php the tabs work flawlessly but the Sidnav doesn't. Any ideas to resolve this issue?

Bartłomiej Malanowski staff commented 4 years ago

I can't see that issue. Is it fixed or am I missing something?


Jo Stone pro commented 4 years ago

Didn't change anything. The Tabs and SideNav work perfectly fine on your side? No errors?


Jo Stone pro answered 4 years ago


Issue ressolved by putting jQuery.noConflict(); to the sidenav code:
<script>
jQuery.noConflict(); 
(function($) {
$(".button-collapse").sideNav();
// SideNav Scrollbar Initialization
var sideNavScrollbar = document.querySelector('.custom-scrollbar');
Ps.initialize(sideNavScrollbar);
})( jQuery );
</script>

Jo Stone pro answered 4 years ago


Here is how the ressources get included in the functions.php:
function theme_enqueue_scripts() {
wp_enqueue_style( 'Font_Awesome', 'https://use.fontawesome.com/releases/v5.4.1/css/all.css' );
wp_enqueue_style( 'Bootstrap_css', 'https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css' );
wp_enqueue_style( 'MDB', '/wp-content/themes/fe/css/mdb.min.css' );
wp_enqueue_style( 'Style', get_template_directory_uri() . '/style.css' );
wp_enqueue_script( 'jQuery', get_template_directory_uri() . '/js/jquery-3.3.1.min.js', array(), '3.3.1', true );
wp_enqueue_script( 'Tether', get_template_directory_uri() . '/js/popper.min.js', array(), '1.0.0', true );
wp_enqueue_script( 'Bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '1.0.0', true );
wp_enqueue_script( 'MDB', get_template_directory_uri() . '/js/mdb.min.js', array(), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_scripts' );


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.10
  • Device: Notebook
  • Browser: Chrome
  • OS: Win
  • Provided sample code: No
  • Provided link: Yes