Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #495527

    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 :)

    #495771

    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 );
    
    • This reply was modified 9 years, 8 months ago by guyom.
    #496216

    Hey,

    So I’m guessing you got it working?

    Regards,
    Rikard

    #496340

    Yes, like a charm :)
    Thanks

    #496832

    Hi,

    Great, glad you got it fixed :-)

    Best regards,
    Rikard

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