Jump to content
Search Community

Direction Aware on hover

Dennyno test
Moderator Tag

Go to solution Solved by PointC,

Recommended Posts

Hi guys.
I was trying to update an old tweenmax script 

See the Pen zxYJZP by johnstew (@johnstew) on CodePen

 to GSAP 3, but I'm entering strange errors.

Any sweet help on this task please?

The syntax seems legit.. just cant make it works. Seems that a var is missing.. but it's the same code taken from the previous codepen.
Thanks all

 

See the Pen NWvBNXV by DedaloD (@DedaloD) on CodePen

Link to comment
Share on other sites

  • Solution

It took me a minute to see what was happening because the original TweenMax version was only showing 2 child nodes and the new GSAP3 version was showing 4 child nodes.

 

LzWNyWJ.jpg

 

xSMvKuM.jpg

 

Looking further I see the HTML in the original demo is all minified whereas the new version is all formatted and pretty so it's picking up the space as a text node I guess. If you use CodePen's "format HTML" feature on the original version, it will break too.

 

Best  to use children or querySelector. 

 

Happy tweening.

:)

 

  • 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.
×
×
  • Create New...