Making elements visible again after initial load

Hello there,

I have used the guideline below to create two different Lightbox menus for www.sebastienbeau.com

https://support.wix.com/en/article/wix-code-tutorial-hiding-an-element-on-certain-pages-with-code

Everything works smoothly if I visit those pages using direct urls. However, the menu buttons attached to the header leading to those lightboxes seem to disappear when I try to redirect to those pages using internal linking such as the flag buttons in the lightbox menu. There is no problem with the redirection but the menu buttons disappear for some reason. I have to refresh the page to get the buttons back on.

I contacted Wix Support and this is a part of the response I got from the team:

In regards to the issue with the lightbox, I can see that you are using a hide function for the icon button (#iconButtonCZSK) in the code panel:

On the initial load of the page, that button is hidden. There should be additional logic within the code that allows the button to be shown when navigating to the associated pages.

Any ideas as to how I can find a way around this one?

Cheers,
Seb

Which buttons?

Forgot to mention the ones that disappear are the menu buttons on the header.

@alucsebastian is it a standard menu or did you create your own?

@andreas-kviby it’s a lightbox menu that I created myself using individual buttons.