High 5 to the Greensock gang for the ScrollTrigger release. The point of this brand-new plugin is activating animation when a page scrolls to particular positions, in addition to when specific aspects remain in the viewport. Anything you ‘d desire configurable about it, is. There’s been a lot of scroll-position libraries throughout the years, however Greensock has a propensity for getting the APIs and efficiency ideal– not to discuss that due to the fact that what you desire is to activate animations, now you have actually got Greensock within your reaches ensuring you remain in great hands. It’s securely incorporated with all the other animation possibilities of GSAP (e.g. animating a timeline based upon scroll position).
CodePen has plenty of examples too, so I’ll seize the day to drop some here for your watching enjoyment. You can have fun with it on CodePen free of charge (look for it).