Hi there,
For one of my projects, I need to add the effect of the disappearance of several elements on the page after the lightbox is opened
I added the code
export function buttonMenuEn_click() {
$w(‘#headerEn’).hide(“FadeOut”);
$w(‘#footerEn’).hide(“FadeOut”);
wixWindow.openLightbox(“MENU-EN”);
}
it works. But I can not think of how to display items on the page back when the lightbox is closed.
I added the code for the event page_mouseIn and page_onViewportEnter, but this event only works if you scroll the mouse wheel or move it to the hotspot.
Then, in your lightbox, remove the default functionality of the close button (or replace it with your own button) and set the button onClick to send data back to the page:
Liran, thanks! But I’m still in trouble. If I need to call the command after closing the lightbox
$w(‘#headerRu’).show(“FadeIn”);
$w(‘#footerRu’).show(“FadeIn”);
wixWindow.openLightbox('Welcome').then(dataObj => {
//This code will run after the lightbox is closed
$w('#headerRu').show("FadeIn");
$w('#footerRu').show("FadeIn");
})
Sorry, I think I found the problem. I can’t use the lightbox.close function on the built in “close” button on the light box. I had to create my own “close” button. And it works!!
It turns out that after trying everything, there is still something I can and did try. Thanks. I love Wix code!!
Though I am using Wix Platform for the first time to create a website, the live page shows a Lightbox Subscribe mode that I had created earlier however this lightbox does not appear anywhere in the editor page. How can I get rid of this lightbox
Hi Guys, I have a heavy process which takes sometime to finish (This process is called on button click by user). I want to open a lightbox which says “Processing. Pls wait …” then call process and once process is over…I want to close Lightbox … I am not able to close it …any idea?