查询装载机2 + Wow.js [英] query Loader 2 + Wow.js

查看:148
本文介绍了查询装载机2 + Wow.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某种原因,在我的页面Wow.js不等待查询装载机开始他们的动画前完成,任何人都可以看到,为什么?

For some reason, in my page the Wow.js is not waiting the query loader to complete before starting their animations, can anyone see why?

我已经尝试使用

onLoadComplete: function() { new WOW().init(); } });

我在另一个问题,但不是为我工作。

这里的网站的链接。

推荐答案

您需要修改 onLoadcomlete 的onComplete ..
下面是完整的工作code:

You need to change onLoadcomlete to onComplete .. Here's the full working code:

window.addEventListener('DOMContentLoaded', function() {
    new QueryLoader2(document.querySelector("body"), {
        barColor: "#000",
        backgroundColor: "#fff",
        percentage: true,
        barHeight: 1,
        minimumTime: 200,
        fadeOutTime: 1000,
        onComplete: function () {
            // wow.js
            new WOW().init();
        }
    });
});

这篇关于查询装载机2 + Wow.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆