Jump to content
Search Community

Scrolltrigger on backward only.

JayShukla test
Moderator Tag

Recommended Posts

Hello,

I take this example from the scrolltrigger demo. I'm doing somthing deffrent with the example. 

I'm trying to manage a scrolltrigger here and the animation should only work backwards or when I scrollup.

The header should be at the top without following the screen when we scroll down.

 

I console " self.direction " -1 will come when I go scrollUp. But don't know how to implement that only for backwards.

onUpdate: (self) => {
    self.direction === -1 ? showAnim.play() : showAnim.reverse()
}

 

See the Pen BarQdJq by henrymanektech (@henrymanektech) on CodePen

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