Jump to content

Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Newbie

About RichSock

  • Rank
  1. I managed to get it working, here was my final code: const sections = document.querySelectorAll('section'); let loadingSectionAnimation = true; sections.forEach(section => { const sectionHeader = section.querySelector('h1'); const sectionAnimation = gsap.from(sectionHeader, { paused: true, duration: 2, yPercent: 200, }); ScrollTrigger.create({ trigger: section, start: 'center bottom', onEnter() { if (loadingSectionAnimation) { gsap.set(sectionHeader, { yPercent: 0
  2. Thank you both for the solutions and ideas, I think I will experiment with the idea of setting a variable like you've suggested, I will let you know how I get on.
  3. Hi, It's a pretty simple one but I can't seem to find any other posts which have covered this. I'm wondering if it's possible to NOT animate elements which are already in the viewport on load when using scrollTrigger. In my codepen example the text within the first section would be static, but the text in the second and third sections would slide up. I'm unable to simply remove the class from the first section as the content will be pulled via a CMS, also the page could potentially be refreshed half way down, in that case whatever elements are then in the vi