Jump to content
Search Community

Position sticky using gsap

EVA CORPORATION test
Moderator Tag

Recommended Posts

Good afternoon!
I wanted to make the block with the table-rates-head class in the "table" scroll within the parent with the table-rates-options class.
But I managed to make the scroll work on the machine, I can't figure out how to make a trigger for the block with scrolling down and up, and not how it turned out on the machine scrolls to the end.

It turns out that I need to make position sticky using gsap, I can't do it purely with styles, due to the fact that there must be overflow hidden...

See the Pen NWewrad by eglit_m (@eglit_m) on CodePen

Link to comment
Share on other sites

 

Nice catch, Mitchel - I didn't even notice since I didn't even check - the pinning just instantly worked for me nonetheless.

 

Please in future make sure that besides the part you are having problems with on the GSAP related side of things, your demos are working / without mistakes @EVA CORPORATION. It can become quite tedious and time consuming trying to help with one thing while there are mistakes on a whole different level that go unnoticed. Fortunatelly this wasn't the case here - well, at least for me it wasn't.
 

Also worth mentioning, that ease is not a property of ScrollTrigger - it is a property of tweens for the most part and that's where it would belong on; setting an ease on the scrollTrigger object is not where it belongs.

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, mvaneijgen said:

I came to the same conclusion, what was trowing me off is that a lot of divs don't have a proper closing tag. Hope it helps and happy tweening! 

 

I'm sorry, it can be seen when I moved and removed a lot of text, I accidentally deleted the closing tag >__<, and then also duplicated with this error T___T

Link to comment
Share on other sites

I corrected the layout and added a version of the code, but it turned out that the scrolling of the block does not go to the end.
It turns out that not all the blocks are open at once, they open one by one, and when I scroll and open blocks 2-3, the opening of the block slows down and does not scroll further...

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