Jump to content
Search Community

Animating modals

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

 

I'm trying to animate how a modal appears when you click on a link/pic. I have 6 different modals each with the same class ".modal" but different ID's. When I add the: TweenMax.from(".modal", 3, {opacity:0, scale:0, ease: Power1.easeIn}); everything works correct when I click on the first picture to open the modal, it fades and scales in but when I close it and click on either the same picture to open the modal again or click on a different picture to open a different modal, the animation doesn't work. I want the animation to keep working whenever you click to open a modal. I'd appreciate any help to solve this problem. I'm new to GSAP but am having fun with it already!

 

Thanks 

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