Stelikas Posted March 21, 2022 Share Posted March 21, 2022 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 More sharing options...
OSUblake Posted March 21, 2022 Share Posted March 21, 2022 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. Link to comment Share on other sites More sharing options...
Stelikas Posted March 21, 2022 Author Share Posted March 21, 2022 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 More sharing options...
OSUblake Posted March 22, 2022 Share Posted March 22, 2022 Nothing stands out to me but it's hard to say without a minimal demo. You said sometimes your doneLoad doesn't fire sometimes, so it's sounds like you might be troubleshooting the wrong thing. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now