Jump to content
Search Community

Scroll trigger : trigger position unexpected behavior on live site, fluid animation

davidbwaters test
Moderator Tag

Recommended Posts

Hi,

 

I need the behavior of my live site to match my codepen implementation and am not sure why the trigger start is not after the title and think this is throwing off the rest of the scrolling.  Thanks in advance.  Not sure what's going on here.

 

So the. codepen demo is here  and  my live site is here https://upbeat-hugle-f33533.netlify.app/

See the Pen QWdrYjO by davidbwaters (@davidbwaters) on CodePen

Link to comment
Share on other sites

 

Hey @davidbwaters

 

It is way out of scope for these forums to debug live websites.

If it works in codepen but not on your site, it must likely be something off with the way you do things there.

 

What I think might be causing your issue is that you are loading the JS in the head of your HTML before everything has been loaded and you are not  creating your fluidRevealEl-ScrollTriggers inside of a DOMContentLoaded-function like you do with other stuff on your page, so these ScrollTriggers might not have the correct values to work with when they are being created.

 

I could be very wrong though - it could be a lot of different things.

But as mentioned, strolling through hundreds of lines of code is not within the support that can be offered here.

 

Welcome to the forums though :) 

We'll be happy to help with any GSAP specific questions.

 

  • Like 2
Link to comment
Share on other sites

Thanks.  I completely understand.  I just wanted to see if I was overlooking something obvious that was ScrollTrigger related.  

 

I wrapped it in a DOMContentLoaded and it still had the issue, but narrowed it down to some DOM change I must be making because I added a 500ms timeout and it works.

  • Like 2
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...