Jump to content
Search Community

Recommended Posts

Sajidul Islam
Posted

Hi all,

 

I would like to get help with an issue I'm facing. I've made an animation which start scaling after reach at the top of the window. But, I would like to start the scaling when it shows on the viewport. I mean it will scroll slowly and when the section reaches at the top, the animation will be complete.

 

I've searched on the forum and found this can be done with the ScrollToPlugin. As a beginner I'm not sure how I can apply it on my code.

 

Any help would be appreciated.

See the Pen dymRdqW by sajidulislam0 (@sajidulislam0) on CodePen.

Posted

Simply adjust your start value: 

// OLD
start: 'top top',  
  
// NEW
start: 'top bottom',  

(meaning to start when the top of the trigger hits the bottom of the viewport)

Sajidul Islam
Posted

Thanks Man, It worked like a char! Really great platform to learn new things.

  • Thanks 1

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...