I am aware how to create hover in an object like a button to show a lightbox (as a pop-up).
https://www.wix.com/code/reference/wix-window.lightbox.html#close
Here is the example of the code:
export function button1_mouseIn(event, $w) { //Add your code for this event here: wixWindow.openLightbox('Welcome'); } export function button1_mouseOut(event, $w) { //Add your code for this event here: wixWindow.lightbox.close(); }
However, how do I hover out from the same object (e.g. a button) to close the lightbox. One issue I found is the lightbox background sits on top of the original page and takes over the entire windows hence the hover out is not going to register in the object of the original page.
Can someone help?
Hi!
It is a pretty common misunderstanding.
Simply implement the mouseOut event on the Lightbox itself and, of course, the code that closes it in the code editor page of the target Lightbox.
Hope it helps.
Best of luck!
Doron. :)