Adding wow.js and animate.css into theme

I’m trying to animate on scroll using wow.js and animate.css, but it’s not working. Here’s what i’ve entered into my child theme function.php file through appearance>editor:

add_filter( ‘x_enqueue_parent_stylesheet’, ‘__return_true’ );

//* Enqueue Animate.CSS and WOW.js
add_action( ‘wp_enqueue_scripts’, ‘sk_enqueue_scripts’ );
function sk_enqueue_scripts() {
wp_enqueue_style( ‘animate’, get_stylesheet_directory_uri() . ‘/css/animate.min.css’ );
wp_enqueue_script( ‘wow’, get_stylesheet_directory_uri() . ‘/js/wow.min.js’, array(), ”, true );
}

//* Enqueue script to activate WOW.js
add_action(‘wp_enqueue_scripts’, ‘sk_wow_init_in_footer’);
function sk_wow_init_in_footer() {
add_action( ‘print_footer_scripts’, ‘wow_init’ );
}

//* Add JavaScript before
function wow_init() { ?>

<?php } Any tips on how to implement these files? Or another way to add animate on scroll to an image? Thanks!!

Hi There,

Thanks for writing in! Your request is outside the scope of the support. However, could you please try following this code (https://gist.github.com/srikat/11533776#file-functions-php) and see if that helps.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.