Hello everyone!
I’m trying to set-up WOW.js lib for a better UX on my next website.
I followed the Wow documentation and enqueued script & style to my function.php child theme like that:
function myclient_scripts() {
//Animate.css
wp_enqueue_style( 'animate', get_stylesheet_uri() . '/../lib/wow-master/css/libs/animate.css');
//WOW.js
wp_enqueue_script( 'wow', get_stylesheet_uri() . '/../lib/wow-master/dist/wow.min.js');
}
add_action( 'wp_enqueue_scripts', 'myclient_scripts' );
But, when I add some special CSS classes on an element (eg: I add “wow bounceInUp” classes on a text block) absolutely nothing happens on front end :(
Did someone has already try this lib? Is Enfold theme compatible? Does another .js file on parent theme could avoid this?
Many questions, no answer…
Thanks for your help :)
My bad… I forgot to initialize the WOW.js (the third script)
//WOW.js
wp_enqueue_script( 'wow', get_template_directory_uri() . '/../myclient/js/wow-master/dist/wow.min.js', array( 'jquery' ), true );
//Animate.css
wp_enqueue_style( 'animations', get_template_directory_uri() . '/../myclient/js/wow-master/css/libs/animate.css' );
//Init WOW.js
wp_enqueue_script( 'wow-init', get_template_directory_uri() . '/../myclient/js/wow-master/wow-init.js', array( 'jquery' ), true );
Yes, like a charm :)
Thanks