Jump to content
Search Community

Tweenmax code works on Codepen but not on localhost

Octipus test
Moderator Tag

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: http://45.76.140.126/

 

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.

 

https://cdnjs.com/libraries/gsap/3.1.1

  • Like 4
  • Thanks 1
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...