Jump to content
Search Community

Pinned section while other are scrolling

balocreation test
Moderator Tag

Recommended Posts

We love helping with GSAP-related questions, but unfortunately we just don't have the resources to provide free general consulting, logic troubleshooting, or "how do I recreate this cool effect I saw on another site?" tutorials. Of course anyone else is welcome to post an answer if they'd like - we just want to manage expectations.  

 

You can post in the "Jobs & Freelance" forum for paid consulting, or contact us directly. 

 

Otherwise, if you've got a GSAP-specific question just post that here along with a minimal demo and we'd be happy to take a look. 

Link to comment
Share on other sites

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
}
});


 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...