Jump to content
Search Community

Problem with text animation on scroll with GSAP

killian_pro test
Moderator Tag

Recommended Posts

Hello everyone!😁

 

I'm new on GSAP so it's possible that my problem is "normal" but I'm currently preparing my portfolio and for the "about" part I wanted to put a text animation on the scroll! In order to reveal the text when scrolling...

 

But unfortunately since today the GSAP animation doesn't work... I tried to go back to previous versions of my site but nothing...

 

Strangely enough, since yesterday everything was working properly on any support or browser, but since today... I've been having major problems even though I haven't really touched anything. 

 

I'm putting the code here and I'd like to thank you very much for your help, as I have the impression that it's a bug linked to the CDN...is there a way of correcting the bug or should I wait?

 

<script src="https://unpkg.com/split-type"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.4/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.4/ScrollTrigger.min.js"></script>

<script>
let typeSplit = new SplitType('[animate]', {
  types: 'lines, words, chars',
  tagName: 'span'
})

gsap.from('[animate] .word', {
  opacity: 0.3,
  duration: 0.03,
  ease: 'power1.in',
  stagger: 0.03,
  
  scrollTrigger: {
    trigger: '[animate]',
    start: 'top 120%',
    end: 'bottom 110%',
    scrub: true,
  }
})
</script>

 

See the Pen aYYOdN by GreenSock (@GreenSock) on CodePen

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