Hi,
I am trying to auto start a Lightbox on the 1st load of my homepage. I want it to run a small video then automatically fade out once the video is finished (9s).
The issue is that I can’t figure out how to make it reference the lightbox specifically.
When I hit “Preview Code” it gives me the error
" TypeError: $w(…).hide is not a function"
This is the code I am using, can anyone help me?
Thank you!
$w.onReady(() => {
waitForLoading();
});
export function button6_onClick() {
$w(‘#lightbox2’).show();
waitForLoading();
}
function waitForLoading() {
setTimeout(() => {
$w(‘#lightbox2’).hide(‘FadeOut’);
}, 9000);
}