Jump to content
Search Community

Cancel mouseout animation for a click animation

GcodeG01 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,

 

Sorry, I'm new to coding, but I kept searching and can't find the answer online. I linked in my codepen a more simplified version of what I want to code.

What I have is a card with 3 sections. Mouseover one of them will turn the text opacity to 0 and mouseout will bring them back to 1. What I want to be able to do is to click on either section and have an animation that has the selected section to take over the whole box (selected section height 100% and the other 2 0%), while having the text opacity to be 0. I'm having trouble with keeping the opacity to 0, as the mouseout is overwriting my click animation.

 

Thank you!

See the Pen dBRmKE by GcodeG01 (@GcodeG01) 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...