Jump to content
Search Community

The code doesn't work the same in codepen.io vs on my website

Vincent D test
Moderator Tag

Recommended Posts

Hi, I've been on this problem for a couple of hours and I can't seem to understand why my code doesn't work on my website while it does on codepen. I have even created a new file just to try this it on a clean sheet but it still doesn't work. Why is that?

 

Here's the link for the website that I'm trying it on : https://treize.dev/gsap_forum/

Here's the link for the codepen : 

 

Thanks in advance! 😁

See the Pen rNLEjNo by d00td00t (@d00td00t) on CodePen

Link to comment
Share on other sites

 

Hey @Vincent D

 

I took the liberty to quickly set up your example code in a local environment of my own, and I found the issue causing it:

In your codepen demo, you only just load TweenMax, whereas in your website build, you are addditionaly loading GSAP 3.2.4.

 

You should not load multiple versions of GSAP, since those might - and in your case appear to - cause conflicts. 

 

I removed the loading of GSAP 3.2.4 and your code worked in my local environment as it does in your codepen demo.

 

Also, probably it would be a good idea to load the latest version of GSAP instead of the old TweenMax, and change your code to the new version's syntax.

 

 

Hope this was helpful.

Cheers,

Paul

 

  • Like 2
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...