Jump to content
Search Community

Fade out pinned section using scrolltrigger

gareth test
Moderator Tag

Go to solution Solved by akapowl,

Recommended Posts

  • Solution


Hello Gareth,



If you want to specify things on the ScrollTrigger attached to a tween, you should be using it as an object and have all the vars relevant to the ScrollTrigger inside that object


gsap.to("#intro", {
  scrollTrigger: {
    trigger: "#content", 
    start: "top top",
    end: screenH,
    scrub: 1,
    pin: true,
  opacity: 0,



Currently you don't have an element with the id of content in your HTML - because the element that you likely meant there has an # in it


<div id="#content"> <-- bad

<div id="content"> <-- better



  • Like 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...