0

我正在使用wow.js 插件和 jquery 预加载教程

预加载器工作正常,但是当它预加载页面上的元素时,wow.js 动画已经结束。我想编辑我的代码,以便在预加载所有内容之后动画将开始。

我已阅读此问题和答案 ,但它不适用于我的代码。

我的代码:

// 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");          
})

如果有人能帮助我,那就太好了,谢谢!

4

1 回答 1

1

使用以下代码通过您的自定义预加载代码实现 wow js。

// 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);          
})
于 2015-06-03T10:46:20.837 回答