Jump to content
Search Community

play animation after reaching to the Anchor

milika test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

HI milika :)

 

Welcome to the GreenSock forum. 

 

I'm not 100% sure I understand your question. Are you saying you want ScrollMagic functionality without using ScrollMagic? If that's the question, you'll want to take a look at this post by Blake:

 

https://greensock.com/forums/topic/16088-gsapscrollmagic-glitchy-in-between-page-sections/?p=70746

 

The demo in that post is really cool and shows you some great techniques. We also had another lengthy thread about not using ScrollMagic that may be helpful:

 

https://greensock.com/forums/topic/14870-do-i-need-scrollmagic-to-use-gsap/

 

Hopefully that gets you started.

 

Happy tweening.

:)

  • Like 3
Link to comment
Share on other sites

Hi Milika,

 

It sounds like you are describing the exact situation ScrollMagic was designed to solve. I think if you went through the most basic ScrollMagic example or watched Petr's free course: https://ihatetomatoes.net/scrollmagic-tutorials-for-complete-beginners/ you would have your answer very quickly.

 

Otherwise you will need to write your own JS to:

 

  • find the element with ID of photo
  • measure its vertical position relative to the window
  • create an event listener to respond to scroll events that will check to see if you scrolled far enough

 

jQuery waypoints is another tool that handles this sort of thing too: http://imakewebthings.com/waypoints/

  • Like 2
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...