Lightbox Fade Out

Hi all, i know this has been asked before but im struggling to find a suitable solution.

i found this code:

import wixWindow from ‘wix-window’;

let popup = wixWindow.lightbox;

$w.onReady(function () {
}, 6000);

it works but i would like to modify it so the light box fades out rather than just abruptly closes.

also, i would like this to happen once a session on the home page, so everytime a use navigates away from the homepage to somewhere else in the site, when they come back it doesnt happen everytime… ive seen some posts about an API.

any chance somebody could help?

for context i have a lightbox thats a welcome screen. it plays a short java animation then i would like it to fade to the homepage without any user interaction.



Home | My Site 1 (