# How do I add MouseIn Hover that COnnects to a Lightbox?

**URL:** <https://forum.wixstudio.com/t/how-do-i-add-mousein-hover-that-connects-to-a-lightbox/35841>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [September 20, 2020, 4:33am UTC](https://forum.wixstudio.com/t/how-do-i-add-mousein-hover-that-connects-to-a-lightbox/35841 "2020-09-20T04:33:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaddeihl](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@chaddeihl](https://forum.wixstudio.com/u/chaddeihl)\
**Post date:** [September 20, 2020, 4:33am UTC](https://forum.wixstudio.com/t/how-do-i-add-mousein-hover-that-connects-to-a-lightbox/35841/1 "2020-09-20T04:33:10Z")

</div>

This is the code I have in the button properties. After I save and preview, when I hover, the lightbox does not open. I am a beginner with coding. Any help would be appreciated with this one.

export function iconButton1\_mouseIn(event) {  
// This function was added from the Properties & Events panel. To learn more, visit [Velo: Working with the Properties & Events Panel | Help Center | Wix.com](http://wix.to/UcBnC-4)  
// Add your code for this event here:  
}

import wixWindow **from** ‘wix-window’ ;  
wixWindow.openLightbox( “#StopBetting” );

---

<div class="post-metadata">

**Author:** ![arthurvalatin](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/arthurvalatin/32/19996_2.png) [@arthurvalatin](https://forum.wixstudio.com/u/arthurvalatin)\
**Post date:** [September 20, 2020, 3:41pm UTC](https://forum.wixstudio.com/t/how-do-i-add-mousein-hover-that-connects-to-a-lightbox/35841/2 "2020-09-20T15:41:29Z")

</div>

Hi Chaddeihl,  
Your code should look like like this:

```javascript
import wixWindow from'wix-window';

export function iconButton1_mouseIn(event) {
wixWindow.openLightbox("#StopBetting");
}

```

import functions always need to come at the top of your code. Also, you need to call your function inside your event.
