Jump to content
Search Community

initializing Flip breaks code

_hedura_ test
Moderator Tag

Recommended Posts

I am new to the flip plugin and I would like to include it to a click event for my page. When I initialize it by adding the "registerplugin" to the top of my page my code stops working. How do I get Flip to work with my current JS?  The code is very simple

 

```

gsap.registerPlugin(Flip);
const pop = document.querySelector(".pop");
const popExit = document.querySelector(".pop-exit");
 
document.querySelector(".img-1").addEventListener("click", () => {
  pop.style.visibility = "initial";
});
popExit.addEventListener("click", () => {
  pop.style.visibility = "hidden";
});
```
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...