Jump to content
Search Community

wandervogel

Members
  • Posts

    2
  • Joined

  • Last visited

wandervogel's Achievements

  1. Thanks for the super swift reply! I went ahead and created the minimal demo you asked for only to find that I couldn’t reproduce the issue there. Even more confusingly – but in a good way – the issue doesn’t show up in the site I am working on anymore, either. I don’t really have an explanation, because the changes I made to the code seem purely cosmetic to me. Anyway, I’m glad it’s working now but thanks anyway for getting back to me so fast and for offering some fascinating insight into the inner workings of GSAP. It’s truly an incredible library that I couldn’t imagine myself working without anymore even though I still feel like I barely scratched the surface of what it’s capable of!
  2. I have noticed that ScrollTrigger briefly switches the scroll-behavior property of my scroller (the html element) from smooth to auto and back as it toggles between isActive states. Is this known/intentional behavior? In my case, it breaks the functionality of a native "back to top" button on the same page because the automated scroll is halted shortly after crossing the isActive threshold. I assumed using GSAPs own ScrollToPlugin would do the trick here but that didn’t help either. Neither did using zenscroll with window.noZensmooth set to true. Any help would be much appreciated. Here is my code. I commented out the code I execute on toggle as it makes no difference to the behavior described above. gsap.to(overlay[0], { scrollTrigger: { trigger: footer[0], start: "top bottom", end: "bottom top", scrub: 1, onToggle: (self) => { if (self.isActive) { // main.addClass("fixed bottom left right"); // spacer.removeClass("hidden"); // overlay.removeClass("hidden"); } else { // main.removeClass("fixed bottom left right"); // spacer.addClass("hidden"); // overlay.addClass("hidden"); } }, }, opacity: 1, });
×
×
  • Create New...