I'm using waypoints.js to see if an element is visible and then I use anim.js to animate it. Works. The problem is that it's running every time I scroll past the element again. I would like the animation to run only one time. I can't really find how I can achieve that. The anime.js documentation is talking about complete() but I don't understand how to use it. Help!
This is what my code looks like:
$('.sequential').waypoint(function() {
var CSStransforms = anime({
targets: this.element,
opacity: [0, 1],
translateY: [50, 0]
});
}, {
offset: '95%'
});