Juten Tag der Herr!
How to use code for lightboxes?
https://www.wix.com/corvid/reference/wix-window/lightbox-obj/close
Close a lightbox…
wixWindow.lightbox.close();
Do also not forget to import …(das kommt nach ganz oben)
import wixWindow from'wix-window';
Giving a time-delay…
setTimeout(()=>{},3000) //---> 3-sec.
Your Code should then look like this one…
import wixWindow from'wix-window'
$w.onReady(function()=>{
$w('#YourButtonID').onClick(()=>{console.log("Click")
setTimeout(()=>{wixWindow.lightbox.close()},3000)
)}
})
Try to complete this code.
Good luck and happy coding.