Jump to content
Search Community

Dmoco

Members
  • Posts

    4
  • Joined

  • Last visited

Community Answers

  1. Dmoco's post in GSAP scroll trigger stagger SVG was marked as the answer   
    Hi guys, no worries I manage to fix it, was quite easy but I forgot to add "path" after the target element name! Here's the updated code for anyone else in the future... 
     

    $(".footer-spacer").each(function (index) {
      let triggerElement = $(this);
      let targetElement = $(".footer-logo path");
     
      let tl = gsap.timeline({
        scrollTrigger: {
          trigger: triggerElement,
          // trigger element - viewport
          start: "top 20%bottom",
          end: "bottom bottom",
          scrub: 1
        }
      });
      tl.from(targetElement, {
      opacity: 100,
      y: "150",
      stagger: .5,
      ease: "expo.out",
      });
    });
×
×
  • Create New...