Jump to content
Search Community

ScrollTrigger Not firing

Nick.Ls test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

Hey, I'm not really sure why this would make a difference unless either the text coming from the backend is dynamically injected later than page load or the class itself is added later?

My guess would be that the fonts are loading later and causing a layout shift?

maybe...

document.fonts.ready.then(function () {
  ScrollTrigger.refresh()
});


If this doesn't help please give us a demo showing the issue. Thanks

Link to comment
Share on other sites

18 minutes ago, Cassie said:
document.fonts.ready.then(function () {
  ScrollTrigger.refresh()
});

I am executing the entire splitting / animation function on document loaded.

 

document.addEventListener('DOMContentLoaded', function() {

 

Shouldn't this be include the fonts loaded?

Thanks!

Link to comment
Share on other sites

I am preloading the fonts to be honest but I will set the animations based on that and see what happens.

For the time being I have a workaround already for my scenario.

Thank you once again!

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