Jump to content


Prevent scrolltrigger replay on windows resize

Moderator Tag
Go to solution Solved by Cassie,

Recommended Posts

Hey everyone!


I would like to prevent the Scrolltrigger from playing each the time the window is resized; basically, I just want each heading to be played once and never again (except or a full page refresh). I'm aware that a normal tween might've been a better solution for what I'm trying to achieve, but I'm rolling with it for now.


See the Pen NWLvVKJ by RoryVB (@RoryVB) on CodePen

Link to comment
Share on other sites

  • Solution



Not sure if I'm missing some reasoning here - but you have an event listener which is adding a new animation on every resize event, so if you remove that you have what you're after? Let me know if I'm misunderstanding your needs!

See the Pen mdGMYQg?editors=0110 by GreenSock (@GreenSock) on CodePen

  • Like 1
  • Haha 1
Link to comment
Share on other sites

Oh wow... Look at me 😅. A great example of tunnel vision I guess.


  • Like 1
Link to comment
Share on other sites

No worries! I love a softball forum question!

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.