Jump to content
Search Community

Animating other links, not selected one

Thales Ribeiro 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

Hi there, 

I'm animating a few thumbnails for a website, you can check out a quick version i adapted for codepen, so you can see what i'm trying to archive.

 

See the Pen ABvqm by anon (@anon) on CodePen

 

What i'd like to add to this, would be an effect on the other thumbnails apart from the one that the user is hovering.

 

For instance, you rollOver on the thumbnail 1, the thumbnail 1 gets its rollover animation alongside with the other fading out for example.

 

I put my animation inside this function, so i'm not sure how to target the other elements.

$(".thumb a").each(function(index, element){}

Cheers,

Thales

Link to comment
Share on other sites

Thanks Carl, 

That's exactly what i needed.

 

Now i just tried to change the code putting the animation for the siblings as a variable that i can play and reverse in the function so it's easier to update the animation.

 

See the Pen ABvqm by anon (@anon) on CodePen

 

I'm not sure what the right syntax might be, 

 

i've tried these as well:

var myTween:TweenLite = new TweenLite(mc, 1, {x:100}); 
TweenLite.to(mc, 1, {x:100}); 
var myTween:TweenLite = TweenLite.to(mc, 1, {x:100});
 
Cheers,
Thales
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...