Jump to content
Search Community

Scrolltrigger bug on pinned el?

Dennyno test
Moderator Tag

Recommended Posts

Hi, on codepen demo seems workin.
I did also update the code with an help from @OSUblake, so now the code is cleaner. 

But on my website seems starting well, then the element which should scale.. jumps far to bottom of its container.. instead of staying there smoothly and pinned.

I know that I can't expect in a solution, just whishing not being the only one and to find which could be the problem, without trying touching things here and there randomly.

I really cant understand. as I've literally tried for 24hours with no luck.


https://staging11.whynot.media/unlock     Thanks for any help

giphy.gif?cid=790b7611e33804e9248ef4a30f

See the Pen oNoxaVN by DedaloD (@DedaloD) on CodePen

Link to comment
Share on other sites

Ugh, that sounds frustrating! 24 hours trying to hunt down the problem with no luck? I've been there before. No fun. 

 

Without a minimal demo that clearly shows the issue, I'm afraid there's not much we can do to help. We just don't have the time/resources to offer free consulting on live sites where there are a bunch of other factors at play. We do offer paid consulting services to a limited number of clients, though, so feel free to reach out to us directly if you're interested in exploring that. 

 

 

A few random guesses for you to look into: 

  • Are you maybe animating something that you're using as a trigger or pin? If so, that's usually a bad idea because of the cross-contamination. Just use a wrapper element instead. 
  • Are you pinning something and ALSO trying to use one of its descendent elements as a trigger or pin for a different ScrollTrigger (sorta like they're nested)? If so, make sure you define the pinnedContainer so that ScrollTrigger can factor that into its calculations. 
  • Try eliminating (temporarily) the ScrollTriggers or animations ABOVE the problematic one. See if that solves it. That might be a clue. Start adding them back in one-by-one until it breaks so you can isolate exactly which one is causing the break. 

When it comes to troubleshooting, one of the most important lessons I've learned is ISOLATE, ISOLATE, ISOLATE! The problem becomes much clearer when you scrape away as much of the extra stuff as possible. 

 

Good luck!

 

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