Support » Fixing WordPress » scrollReveal.js

  • I tried adding scrollReveal.js to my template theme by uploading the scrollReveal.js file to my theme files /js folder and then added this code to my functions.php file to add the .js file to the footer of theme.

    //* Enqueue ScrollReveal.js
    add_action( 'wp_enqueue_scripts', 'enqueue_scrollreveal' );
    function enqueue_scrollreveal() {
    
    wp_enqueue_script( 'scrollreveal', get_stylesheet_directory_uri() . '/js/scrollReveal.js', array( 'jquery' ), '', true );
    
    }

    I then added the required code to animate a div and it sets the opacity of the div to 0 with no animation.

    data-scrollreveal="enter top"
    also tried..
    data-scroll-reveal="enter top"

    What could be the ordeal?

Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘scrollReveal.js’ is closed to new replies.