Jump to content
Search Community

balocreation

Members
  • Posts

    17
  • Joined

  • Last visited

Posts posted by balocreation

  1. Thanks, I have fixed it... I add extra class to the element I want to pin, then adjust the start and end value...
     

    const faqsContent = gsap.timeline({
    scrollTrigger: {
    trigger: ".faqs",
    start: "top center",
    end: "bottom top",
    scrub: 1
    }
    });
    faqsContent.from(".faqs-img", { scale: 1.5 });
    faqsContent.to(".faqs-mask", { clipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)" }, 0);
    faqsContent.to(".faqs-mask", { duration: 1, scale: 1 });
    gsap.from(".faqs .card", {
    y: 50,
    opacity: 0,
    duration: 1,
    stagger: 0.25,
    ease: "expo.out",
    scrollTrigger: {
    trigger: ".faqs",
    pin: ".sticky",
    pinSpacing: false,
    start: "top 70px",
    end: "bottom bottom",
    scrub: 1
    }
    });


     

  2. Thanks, I have fixed it.

     

    const createSplits = () => {
    Array.from(document.querySelectorAll(".section-heading")).forEach(el => {
    if(el.motion) {
    el.motion.progress(1).kill();
    el.split.revert();
    }
    el.split = new SplitText(el, {
    type: "lines,words,chars",
    linesClass: "split-lines"
    });
    el.motion = gsap.from(el.split.chars, {
    scrollTrigger: {
    trigger: el,
    toggleActions: "restart pause resume reverse",
    start: "top 100%",
    end: "bottom top"
    },
    y: "0%",
    opacity: 0.2,
    duration: 0.02,
    rotationX: -0,
    ease: "none",
    stagger: {
    amount: 0.8,
    from: "start"
    }
    });
    });
    }
    ScrollTrigger.addEventListener("refresh", createSplits);
    createSplits();
  3. 5 hours ago, Cassie said:

    Not entirely sure what you mean by that - but if you want to change the actual color when it's over a certain section you could use event listeners and then tween to a new color.

     

     

     

    I can't click or hover on html elements. Example: I can't toggle an accordion.

     

    Screenshot 2022-07-13 at 3.52.50 AM.png

×
×
  • Create New...