2

Smooth State conflicts with other js plugins

I'm having issues when trying to add smoothState.js to my site it stops wow.js from working. No errors are logged in the console.

When using animsition, wow.js works as a callback;

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());
Community
  • 1
  • 1
SeakDigital
  • 73
  • 1
  • 7
  • I found with smoothstate that setting in wow "live: true" to "live:false" - seemed to yield better results - and I needed to run it like this: http://stackoverflow.com/a/38215965/1729791 – iamrobert Sep 29 '16 at 08:48

0 Answers0