Search.../

lightbox

A lightbox pops up on your site to grab your visitor's attention.

Description

To use the Lightbox API, import wixWindow from the wix-window module:

import wixWindow from 'wix-window';
javascript | Copy Code

The APIs in wix-window.Lightbox can only be used in front-end code.

Type:

LightboxRead Only

Was this helpful?

Set the lightbox to close after 6 seconds

Copy Code
1import wixWindow from 'wix-window';
2
3let popup = wixWindow.lightbox;
4
5$w.onReady(function () {
6 setTimeout(function(){
7 popup.close();
8 }, 6000);
9});