WOW ? Not able to init WOW


Topic: WOW ? Not able to init WOW

kemal.secer pro asked a year ago

Expected behavior I am using MDB jQuery PRO via webpack in my symfony project. All javascripts, images and misc assets are compiled and packed.

Actual behavior Some how i am not able to use the animations.

<script type="text/javascript">
    document.onreadystatechange = function () {
       new WOW().init();

is not working

Error Message Firefox Webconsole says this...

TomekMakowski staff answered a year ago


Could you show me your whole page in snippet. It would more help.



kemal.secer pro commented a year ago

The whole page was an exact copy of some samples, I've got from your site here. Nothing more, nothing less. I was able to bring the animation library to work.

As I use Symfony's webpack-encore, I have had to add wow.js as node_module. I've adapted this from your Webpack tutorial [] So: webpack managed libraries are not exposed to symfony's twig templates. I've had to expose them manually in my entry point javascript file.

I'll add my startup javascript file as snippet.

kemal.secer pro answered a year ago

I've added mdb-480-pro source files into an asset folder in my projects root folder.

Folder Structure

My own project related files go under the app folder, everything else (3rd party) under the vendors folder. The entry point (startup) script is main.js under the app folder.

var $ = require('jquery'); 
import WOW from 'wow.js'; 

window.$ = $;
window.jQuery = $;
window.WOW = WOW;

 * @module jQuery

 * @module Popper.js

 * @module Bootstrap

 * @module FontAwesome5

 * @module MBD + datatables addon + rating addon

Look @ Importing External Libraries & Global Variable - Course: Webpack Encore: Frontend like a Pro! Tutorial

Please insert min. 20 characters.


Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: jQuery
  • MDB Version: 4.8.0
  • Device: Desktop
  • Browser: All
  • OS: Linux
  • Provided sample code: No
  • Provided link: No