0

I am pretty new to rails. I wish to add some cool transition effects on my landing page using wow.js (https://github.com/matthieua/WOW)

I installed wow.js using yarn add wow.js

I created a new wow.js in my javascript asset pipeline with the following

import {WOW} from 'wowjs'

const wow = new WOW({
  boxClass: 'wow',
  animateClass: 'animated',
  offset: 0,
  live: true
});

wow.init()

I import wow.js in my application.js file (import '../components/wow')

I added to my webpage the css wow tags.

However, the effects do not work on my webpage. I get the following error message:

MutationObserver is not supported by your browser.
wow.js:130 WOW.js cannot detect dom mutations, please call .sync() after loading new content.

Do you have any idea how to solve this?

Thanks a lot for your help,

Chris

barbsan
  • 3,418
  • 11
  • 21
  • 28
Chris
  • 1
  • 1

1 Answers1

0

I found the (simple) answer to my problem. Basically I just needed to - turn live to false to stop the js error message - include the Animate.css in my webpage, which is actually the code responsible for the transition effects (js only triggers with Event Listener)

Chris
  • 1
  • 1