Jquery preloader & wow.js

1.2k views Asked by At

I am using the wow.js plugin & a jquery preload tutorial.

The preloader works fine but when it has preloaded the elements on the page, the wow.js animation is already over. I want to edit my code so after that everything is preloaded the animations will start.

I have read this question & answer but it didn't work for my code.

My code:

// makes sure the whole site is loaded
jQuery(window).load(function() {
    // will first fade out the loading animation
    jQuery("#status").fadeOut();

    // will fade out the whole DIV that covers the website.
    jQuery("#preloader").delay(500).fadeOut("slow");          
})

It would be great if anyone would help me, Thank you!

1

There are 1 answers

0
Irfan Ansari On

Use following code to implement wow js with your custom pre-load code.

// makes sure the whole site is loaded
jQuery(window).load(function() {
// will first fade out the loading animation
jQuery("#status").fadeOut();

// will fade out the whole DIV that covers the website.
jQuery("#preloader").delay(500).fadeOut("slow");

// Here will be the WoW Js implementation.   
setTimeout(function(){new WOW().init();}, 1000);          
})