How to open a lightbox on mousein?

Hello,

Tried to open a lightbox when a mouse in to a element (button), but this doesn’t work for me. The code is as follows:
import wixWindow from ‘wix-window’;
export function button1_mouseIn() {
wixWindow.openLightbox(“lightbox2”);
}

Can anyone help please?
Thanks!
Yury

Is lightbox2 the name of the lightbox or the id? It is the name of the lightbox you should pass into the function not the id.

Hi Yury!
Make sure youre using right name of lightbox. Confusingly (but mentioned in documentation), you sould use not id of the lightbox, but it’s name. Here - 2017-11-15_1231

Checked right now, it works for me…

Oh well, I used ID… Thanks guys, and have a nice time :slight_smile:
Yury