Animation on scroll

I have to make an animation appear once i scroll to it. I tried to google the answer but i can’t seem to figure it out. Here’s the code:

can you help me please?

Solved it using scroll magic!

var controller = new ScrollMagic.Controller();

var scene= new ScrollMagic.Scene (



.setClassToggle(’.has-animation’, ‘animate-in’)