smoothState.js阻止其他插件运行ie。 wow.js

时间:2015-02-10 08:20:43

标签: javascript jquery ajax plugins jquery-plugins

平滑状态与其他js插件冲突

我在尝试将smoothState.js添加到我的网站时遇到问题,导致wow.js停止工作。控制台中未记录任何错误。

使用animsition时,wow.js可以作为回调使用;

var wow = new WOW({
    boxClass:     'wow',      // animated element css class (default is wow)
    animateClass: 'animated', // animation css class (default is animated)
    offset:       0,          // distance to the element when triggering the animation (default is 0)
    mobile:       true,       // trigger animations on mobile devices (default is true)
    live:         true,       // act on asynchronously loaded content (default is true)
    callback:     function(box) { // jshint ignore:line
      // the callback is fired every time an animation is started
      // the argument that is passed in is the DOM node being animated
    }
});
var wowInit = function() {return wow.init();};

var animsitionInit = function(callback) {
    $('.animsition').animsition({
        inClass: 'zoom-in-sm',
        outClass: 'zoom-out-sm',
        inDuration: 1500,
        outDuration: 800,
        linkElement: '.animsition-link',
        loading: true,
        loadingParentElement: 'body', //animsition wrapper element
        loadingClass: 'animsition-loading',
        unSupportCss: ['animation-duration',
            '-webkit-animation-duration',
            '-o-animation-duration'
        ],
        overlay: false,
        overlayClass: 'animsition-overlay-slide',
        overlayParentElement: 'body'
    });
    return callback;
};
animsitionInit(wowInit());

0 个答案:

没有答案