Join the Webstudio community

Updated 8 months ago

GSAP not displaying intermittently

At a glance

The community member created a page to test GSAP code, which used to work when they opened it, but stopped working when they cloned the page and made changes. They tried it on different browsers and got the same result. The community member is unsure what they did wrong, and also mentioned that copying GSAP code from one project to another is hit or miss in terms of it working.

In the comments, another community member mentioned having similar issues with GSAP, particularly when first integrating it into a site, and that a full restart fixed the issue. Another community member asked where the ScrollTrigger plugin was being loaded from, noting that the first HTML embed had both GSAP and the plugin, while the second only had GSAP.

The original community member responded that they are a beginner with GSAP, and followed the installation instructions from the GSAP website, which worked initially, but not always when they tried to recreate it in another project. They are unsure what they did or didn't do, and suggested they should watch the video a few more times.

The community members discussed the differences between the HTML embeds in the two projects, and the original community member concluded that as long as they don't copy/paste or clone, the GSAP code works fine.

Useful resources
I created a page to test out gsap code. It used to always display it when I opened it. It seems to display it when on the published site. However, if I clone it and then either change the site name or make a different page the home page then it stops working. I tried it on a few browsers, and seem to get the same result. I'm guessing it is an error on my side, but I'm not sure what I did. Also, if I copy the gsap from one project to another, it's hit or miss if it works or not πŸ€·πŸ½β€β™‚οΈ
https://apps.webstudio.is/builder/b76ec81a-dda6-4689-976e-68048be9ec69?authToken=d67fe2b4-dc1e-4790-8fdd-c3aa13dd8d26&mode=preview
https://gsap-test-asdf.wstd.io/
D
d
O
11 comments
I’ve had some issues with GSAP showing as well. Particularly when first integrating into the site. Run scripts on canvas was on. A full restart fixed it though.
where do you load ScrollTrigger plugin from?
ofc in the first html embed you have both gsap and the plugin
in the second you only have gsap
how you managed to do that by just cloning?
Hi Oleg, so I'm pretty much a beginner and new to GSAP. All I did was watch the video from the gsap installation page and followed along and I might have asked chat gpt on the code before putting in an html embed, https://gsap.com/docs/v3/Installation/
It worked so I tried to recreate it on another project. It worked by cloning but not aways, I'm not sure what I did or didn't do, lol. Maybe I should watch the video a few more times πŸ€·πŸ½β€β™‚οΈ
well I wonder how you got a modifed version of the html embed between first and second project
you can see the second html embed doesn't have the second script
weird. as long as I don't copy/paste or clone then it works fine. thanks!
Add a reply
Sign up and join the conversation on Discord