Can I add to my lightbox in&out slide transition?

I’m trying to add in&out slide transition to my lightbox, but when I write the code there’s an error says:

I can’t add a slide effect to the overlay background of the lightbox? only to the lightbox content itself?

here is my code:

let slideOptions = {
 "duration":   1500,
 "delay":      100,
 "direction" : "left"
};

export function close_mouseIn(event) {
     $w('#background').hide("slide", slideOptions) 

please advice :slight_smile:
Hila

https://www.wix.com/velo/reference/wix-window/lightbox-obj/getcontext

thanks
I see here that I can only open lightbox, but how I can to add transition when it closed?

@hilaccc
You can setup the lightbox-animations/transitions in the wix-ui (animations) directly on the lightbox itself.

A CODE-SOLUTION you will find here…
https://www.wix.com/velo/forum/community-discussion/i-m-trying-to-make-a-loading-screen-and-was-wondering-if-this-code-would-work