Jump to content
Search Community

GSAP Timeline sometimes fires sometimes it does not

Stelikas test
Moderator Tag

Recommended Posts

I have created a preloader for my website although i never had an issue like this before and i started using Turbolinks which maybe is causing this issue but it shouldn't.

 

    Pace.on('done', () => {
        doneLoad()
    })

function doneLoad() {  

            gsap.timeline()
            .set('html, body', {
                overflowY: 'unset'
            })
            .set('#app, #__footer', {
                visibility: 'visible', 
            }, 'add')
            .add('do')
            .to('.turbo__lines', {
                stagger: .3,
                height: '0%'
            })
            .to('.turbo__logo, .__loader', {
                duration: .3, 
                opacity: 0
            }, 'do')
            .to('.turbo__loader', {
                visibility: 'hidden'
            }) 
    }

 

So when the loading is finished on my website the function doneLoad() is called most of the times it fires correctly, but there are times that it doesn't fire for some reason, no errors, and the loader just stays forever. 

 

Am i doing anything wrong with the above code? 

Link to comment
Share on other sites

2 hours ago, OSUblake said:

Welcome to the forums @Stelikas

 

Do you have a GSAP-specific question? We're more than happy to help with those, but we don't offer support for Turbolinks or Pace or whatever you're calling your GSAP code with.

 

Hello, i'm looking to see if there is anything wrong with my gsap timeline code, everything else seems to work as expected. 

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