Jump to content
Search Community

Targeting nested classes in 'this', using GSAP

Jonny test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello,

 

As you will see from my codepen, I have multiple elements, which I want to apply a Greensock tween (actually eventually it will be a timeline) when the 'onmouseover' event is triggered.

 

It is all working well, but it applies the Tweening to all elements, - i only want it to happen to the specific one i'm hovering over.

I don't want to use different id's etc, because I will ultimately have multiple elements.

The mouseover is targeting all the classes it finds a match to, not just the nested one in 'this' svg.....

 

Essentially I want my tween to look like this, - I believe the logic to be correct but the syntax is not. (Bold is the part that is the problem):

    TweenMax.to( this > + '.logoCircle', 0.75, {alpha:0, delay:0})
 

Thanks in advance for your help.

 

Regards

Jonny

See the Pen OxVwZp by JonnyPS (@JonnyPS) on CodePen

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...