I'm currently working on a SVG infographic (my first GreenSock project), and I have a little problem. When I click on a tile, it will perfectly slide out of the pie chart. However it only slides back in when I click on another tile that isn't open. But I also want it to close.
Collapse SVG tile onclick
in GSAP
Posted
Hello there,
I'm currently working on a SVG infographic (my first GreenSock project), and I have a little problem. When I click on a tile, it will perfectly slide out of the pie chart. However it only slides back in when I click on another tile that isn't open. But I also want it to close.
For example:
Click Tile 1 -> Opens
Click Tile 1-> Closes
Now it only does this:
Click Tile 1 -> Opens
Click Tile 1 -> Nothing
How can I fix this?
See the Pen VMKpLV by anon (@anon) on CodePen