Jump to content
Search Community

josh-warner

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by josh-warner

  1. Hey Jack, thanks for the quick reply. Okay that helped me look elsewhere, I have just worked out it was an issue within React not ScrollTrigger. 

     

    I was using React hooks and needed to update the hook to not run on every render rather only on mount.

     

    Thanks again

    • Like 1
  2. Hi team,

     

    I have an animation which tweens in from the top of the screen on scroll using ScrollTrigger. The issue I have found is if I scroll part way down the page, and refresh the screen, the page loads after the trigger and so the animation is already in its completed state (which it should be) but when I scroll back up to the top of the page past the trigger it doesn't reverse the animation and the element is stuck in its completed state rather than be reverted to where it started from.

     

    Couldn't replicate the issue on codepen since you can't refresh the page part way down but this is how I have setup the animation: 

    See the Pen JjGOJZo by josh-kiwi (@josh-kiwi) on CodePen

     

    If you were to reload the page half way down, the pink box would be visible, but after scrolling to the top it would not hide itself.

     

    Thanks!

    See the Pen by (@) on CodePen

  3. Hi all!

     

    I have been upgrading a site to gsap v3 and switching out my ScrollMagic code for ScrollTrigger code (ScrollTrigger btw is amazing so thanks a lot!).

     

    I am trying to run a timeline().add() method on the TL to fire a custom function but it refuses to fire unless I add another tween to the timeline like a to() method or the like. 

     

    Code pen with this issue attached, just curious if I am going about this the wrong way or is there a bug here? I tried using ScrollTrigger.create() directly instead but I had the same issue where it refused to fire my function.

     

    Thanks again, you guys have done a great job with gsap and all its plugins.

    See the Pen jOWbQjO by josh-kiwi (@josh-kiwi) on CodePen

×
×
  • Create New...