Jump to content
Search Community

pepethefroggg

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by pepethefroggg

  1. Hi, how do I remove the right indicator of the scroller?

    The green and the red lines that indicate when an animation starts, I used GSAP a lot of time ago and literally can't even remember what this is and what's called ahahah I'm stuck

    1949196418_Schermata2022-05-31alle17_53_34.png.f5173b89b7c7d5fe2ccdbc105f835aff.png

  2. 16 minutes ago, OSUblake said:

    Try this.

     

    
    gsap.to(".box", {
      scrollTrigger: {
        trigger: ".box",
        start: "top center",
        end: "top center",
        toggleActions: "play none reverse none",
        markers: true,
        invalidateOnRefresh: true
      },
      ease: "power2.out",
      x: setWidth,
      duration:1.5,
    })

     

    Invalidate on refresh will call any functions again.

     

    This just sets the value.

    
    x: setWidth()

     

    This is a reference to a function that will get called.

    
    x: setWidth

     

    Thank you so much! This was really really helpful

    • Like 1
  3. So I was trying to add gsap to a website where I'm already using smoothscrollbar.js from idiotWu. 

    As you can see from the codepen the scrollers scroll with the rest of the page, without giving me the chance to trigger the animation.

     

    I tried to move things around, like choosing a different DOM element as scrollbar, or loading gsap before smoothscrollbar and others.

    I just can't find a way to keep both smoothscrollbar.js and gsap in the same project

    See the Pen vYmKoNo by pepethefroggg (@pepethefroggg) on CodePen

×
×
  • Create New...