Jump to content
Search Community

onClick move only happens once

SBee123 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!

Part of this is doing what I had hoped - When the user clicks the blue box, a new red content box moves up to cover it and when they click the red box it moves back down. My problem is that when i click the blue box again to restart the motion (again) nothing happens i must be missing a reset or something. Eventually this page will have many absolute positioned boxes like this, moving from different x, y directions hoping I can get this to work. This is not a traditional webpage, but a special use case.

Thank you in advance!

See the Pen aaPyKa by aqshawnbee (@aqshawnbee) on CodePen

Link to comment
Share on other sites

Hello!

 

I have another question related to this - I have updated my codepen here:

 

See the Pen aaPyKa by aqshawnbee (@aqshawnbee) on CodePen

 

My question is - If I have clicked on one of the top boxes (blue, yellow, purple) and the link boxes move into place, is there anyway i can get it so that only one link box can be showing at once? So if the red link box moves up and I go over and click the yellow box, the red link box will shift back down, and the orange box shift up. 

Than you in advance!!

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