Mouse Hover In to show lightbox?

Hey Everyone! Is it possible to do the on mouse hover in and out for a button to show a lightbox? I have buttons I want to assign to lightboxes but only show on hover in. thanks! I think this would be better over a bunch of block texts all over the page.

Every hex has a text button so each of those I made a lightbox for… but only want them to show on hover over the buttons. So 1 text button per lightbox. But only show on hover in

Hey Sandy,

To open a lightbox from code, check out the openLightbox() API .
You can then, for each button, add an event handler to the onMouseIn event, and open the relevant light box.

Good Luck,
Itai

Hi Itai /Hi Sandy,
After I open the light box, how can I close it when I hover away from the button ?
Thanks for your reply

It’s a pretty old post, but I have the same issue …

I want to open a lightbox when hovering a button inside the header area.
So I put the code inside the masterPage.js, true?

The code:

import wixWindow from ‘wix-window’ ;
export function button1_mouseIn ( event ) { console . log ( “mouse over Button” )
wixWindow . openLightbox ( ‘lightbox1’ );
}

When I test that code the console says:
Error: There is no lightbox with the title “lightboxMenueDE”.

What’s wrong there, doesn’t it work inside the header section?

Thanks in advance!

Your Light-Box-Name seems to be wrong.

“lightboxMenueDE”