Jump to content
GreenSock

Ryan Dejaegher

Members
  • Posts

    2
  • Joined

  • Last visited

Ryan Dejaegher's Achievements

0

Reputation

  1. @ZachSaucier Awesome that should work! Would there be any advantage to creating an array of the panels and then using that for scrollTo? var panels = gsap.utils.toArray(".panel") function goToSection(i, anim) { gsap.to(window, { scrollTo: {y: panels[i].offsetTop + firstElem.offsetTop, autoKill: false}, duration: 1 });
  2. Hey @ZachSaucier how's it going? I've found your demos really helpful. I've got a question about your layered pinning/ScrollTo demos. I'm having trouble when there is content above/below. I forked the demo and added a div with a height of 100vh above the pinned section. In this demo when I try scrolling it just tries to snap back to the top. https://codepen.io/ryandejaegher/pen/ZEObrdR How would you approach this kind of layout to accommodate sections above/below a pinned area I was hoping to use the ScrollTo plugin so that it could snap to that section.
×