Jump to content


Tweenmax code works on Codepen but not on localhost

Recommended Posts

Hi guys,


First post here but i`m out of any options and ideas so maybe someoe could help me.

I`m using tweenmax to animate an SVG for a website i`m currently working. 

The animation works fine on codepen. However when i use it on the localhost or srver it does not work. 

I have checked the other threads in regards with this proble but they all relate to missing dependencies (which is not the problem in my case)

I have also stripped all the js and css that goes on that page i am using the svg animation - still without effect.


If anyone has any idea and can point me in the right direction, it would be highly appreciated!

The website url is:


Thank you

See the Pen oNXvxdV by octipus (@octipus) on CodePen

Link to comment
Share on other sites

Your ".box" element is covered by rest of the content, so mouse never moves over it. Try setting event on ".home" or some other element that won't be covered content, ".home" is container so it should work fine.


Load TweenMax(or any other library that your code depends on) before your code. The TweenMax version you are using is really old, if you want to use GSAP 2 then use version 2.1.3 or use GSAP 3.



  • Like 4
  • Thanks 1
Link to comment
Share on other sites

@Sahil You`re a legend it works like a charm!

I`ve updated the library as well.

Thank you so much for your help! 🙏


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