Now this works fine, although I have expandable/callapsable items in the sidebar. So the sidebars height changes. This makes the triggers positions incorrect. What would be the best way to update the scrolltrigger in this case?
I've tried .refresh, .kill, .disable and calling the stickyBothDirections function again to fix it. But it doesn't fix it correctly.
Loving ScrollTrigger, but can it do this to pins.
in GSAP
Posted
Hi, great solution for a sticky sidebar, just what I was looking for!
Sorry for commenting on an older topic, but if anyone would be able to help with my issue, I'm kind of stuck finding the solution.
I am using the code from the previous example:
See the Pen wvMRroV by GreenSock (@GreenSock) on CodePen
Now this works fine, although I have expandable/callapsable items in the sidebar. So the sidebars height changes. This makes the triggers positions incorrect. What would be the best way to update the scrolltrigger in this case?
I've tried .refresh, .kill, .disable and calling the stickyBothDirections function again to fix it. But it doesn't fix it correctly.
Any help would be great!