How do you not include animation wow.js in the scrub up?



  • Good afternoon! I use animate.cs+wow.js. And there's a problem - if you reload the page in the subway, for example, to the middle, after rebooting the cover up the wow.js also works. I need to make sure that in the plug, wow.js only works on the cloth downwards, and all the elements are downloaded without animation. How can you do that? Wow's documentation didn't find this thing.

    Or advise libraries like Wow.js that have such a function.

    Connection code Wow.js

     initWow_scroll: function(){
        var main = this;
    
    var wow = new WOW(
        {
            offset:       0,          // distance to the element when triggering the animation (default is 0)
            callback:     function(box) {
                // the callback is fired every time an animation is started
                // the argument that is passed in is the DOM node being animated
            },
            scrollContainer: null // optional scroll container selector, otherwise use window
        }
    );
    wow.init();
    
    return main;
    

    }



  • The reference code next time. Example javascript:

    // Showed...
    $(".revealOnScroll:not(.animated)").each(function () {
      var $this     = $(this),
          offsetTop = $this.offset().top;
    

    if (scrolled + win_height_padded > offsetTop) {
    if ($this.data('timeout')) {
    window.setTimeout(function(){
    $this.addClass('animated ' + $this.data('animation'));
    }, parseInt($this.data('timeout'),10));
    } else {
    $this.addClass('animated ' + $this.data('animation'));
    }
    }
    });
    // Hidden...
    $(".revealOnScroll.animated").each(function (index) {
    var $this = $(this),
    offsetTop = $this.offset().top;
    if (scrolled + win_height_padded < offsetTop) {
    $(this).removeClass('animated fadeInUp flipInX lightSpeedIn')
    }
    });

    Reference example: http://codepen.io/benske/pen/yJoqz




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2