Jump to content
Search Community

GSAP with Intersecting observer animate on entry

Louienator test
Moderator Tag

Go to solution Solved by Louienator,

Recommended Posts

Hi.. Got another question but this time it's different.. Is there a way that i can incorporate GSAP and intersecting observer? i'm just basing from an example i saw on forums and tried it out.. but i'm confuse on why it didn't work..  Apologies for being noob..

 

What i wanna achieve is that, when ever the user scrolls, it will show the next item and animate...


Here's the fiddle:


https://jsfiddle.net/es982zh0/31/

Link to comment
Share on other sites

I'm a bit lost. What should your example do? 

 

Here are some tips that will increase your chance of getting a solid answer:

  • A clear description of the expected result - "I am expecting the purple div to spin 360degrees"
  • A clear description of the issue -  "the purple div only spins 90deg"
  • A list of steps for someone else to recreate the issue - "Open the demo on mobile in IOS safari and scroll down to the grey container" 

I see you're loading ScrollTrigger, but you're not using any ScrollTrigger code. Take a look at the docs for ScrollTrigger and be sure to watch the amazing introduction video, this will go over how everything works and example how to use it. I never used the IntersectionObserver but I googled it and this caught my eye 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...