1

I can't get wow.js to work with animate and fullpage. I'm currently on WAMP so can't share a link.

It loads all the scripts, checked that in the network tab, wow is loaded before body and it's initialized. I got some sample dummy index.php code to check the functionality. It loads the first block and animates it, but the second block stays visibility:hidden (so I'm assuming wow is loaded)

<?php

function base_scripts_styles() {

wp_enqueue_script( 'theme-script', get_theme_file_uri() . '/js/theme-js.js', array(), '', false );
wp_enqueue_script( 'theme-fullpage', get_theme_file_uri() . '/js/fullpage.js', array(), '', false);
wp_enqueue_style( 'theme-fullpagecss', get_theme_file_uri() . '/fullpage.css', array(), '', false);
wp_enqueue_style( 'theme-animate', get_theme_file_uri() . '/animate.min.css', array(), '', false);
wp_enqueue_script( 'theme-wow', get_theme_file_uri() . '/js/wow.min.js', array(), '', true);
}

add_action( 'wp_enqueue_scripts', 'base_scripts_styles' );


//* 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 </body>
function wow_init() { ?>
    <script type="text/javascript">
        new WOW().init();
    </script>
<?php }

This is the code for the blocks (on index.php)

<div id="fullpage">
<div class="section section1">
<div class="left wow fadeInLeftBig">
one
</div>

<div class="right">
two
</div>
</div>
<div class="section section2">
<div class="right">
three
</div>

<div class="left wow fadeInLeftBig">
four
</div>
</div>

</div>
Per
  • 97
  • 1
  • 1
  • 8

1 Answers1

0

I figured it out. scrollBar: true, for fullpage settings (blush)

Per
  • 97
  • 1
  • 1
  • 8