_hedura_ Posted June 27, 2022 Share Posted June 27, 2022 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 More sharing options...
GreenSock Posted June 28, 2022 Share Posted June 28, 2022 Hi @_hedura_. Welcome to the forums. It's pretty much impossible to troubleshoot by just looking at a small excerpt of code. Can you please provide a minimal demo that clearly shows the problem? I wonder if you just forgot to load Flip plugin. Are you seeing any errors in the console? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now