It won't dissapear

I had a zoom-in function where it basically created a div of higher z-index to the rest, but the issue is that, the button i pressed it with won’t dissapear, can anyone suggest any methods to fix this?

please share the code of what you have tried

I was talking more conceptually since my code are spaghetti code, theoretically what can I do?

This sort of thing really is difficult to actually diagnose unless you share your code.

This is the codepen code. The image dissapeared because I stored the image from my local file, instead of a link. My main concern is in the portofolio section, when you hover and click zoom in, the zoom in button still stays there, tho the z-index of the div does change.

Granted this is mostly spaghetti code and if you can’t find the solution it’s fine. But any feedback or help is appreciated. Thanks!