Jump to content
Search Community

How to make a pinSlider with two opposite direction of sliding with different animation..

Xenex122 test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

So I have a problem wherein I want to do a scrolling vertically and pin the "parent" in the codepen and then If I ever scroll the...the animation that goes upward it will go upward if it scroll and if the animation downwards if it scroll too but the parent must be pin so I put a pin there in my codePen so it was all set up but I don't know if this is the right method to do...Can you guys give me a hint or any link where I can do that? I want to pin the "parent" and then when I scroll the opposite animation will go up and down once I scroll down. If anyone could help me it will be a big help.

 

See the Pen ExQmYXM by myth-vince (@myth-vince) on CodePen

Link to comment
Share on other sites

  • Solution

I was not sure about your question, but what I think you mean is something like this?

 

I've created one timeline (I removed the CSS animations, because we are using GSAP). The left element moves up and the right element moves down and when you scroll in reverse the animation will play in reverse. Both these items have there own animation, but with the Position Parameter they will both start at the same time

 

See the Pen GRQmKVv?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

  • Like 2
Link to comment
Share on other sites

Let say I have scroll down then each of the side of content will go up and down but I want per boxes to animated when I scroll down up or down...but the boxes will animated based on the scroll..if its up the animated will be like something skewY(90deg) and if down then skewY(-90deg) per boxes.

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