Jump to content
Search Community

FLIP turning button into a modal

The Refinery test
Moderator Tag

Recommended Posts

Hi there,

 

Not sure if you guys can help me with this one.

 

When a user clicks the button, i'm looking for the button to morph into the shape of the modal. Inside this modal the newsletter form with show. And when a user clicks outside the modal or an 'x' button it should morph back into the shape.

 

Ideally, this is just a visual effect between the button and the modal appearing, meaning that the inside of modal isn't actually a button but a div- if that makes any sense.

 

Any help would be appreciated.

 

Thanks!

See the Pen XWERPJY by jonnyjones99 (@jonnyjones99) on CodePen

Link to comment
Share on other sites

By "shape", you just mean rectangle-to-rectangle, right? You're only talking about the coordinates/size? If so, Flip.fit() may be helpful. It wasn't clear to me what was supposed to do what in your CodePen, sorry. 

 

Here's a quick fork that shows fitting the shape: 

See the Pen ExLqENR?editors=0110 by GreenSock (@GreenSock) 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...