Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

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

Share this post

Link to post
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

Share this post

Link to post
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

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.