Open a Lightbox or Show and Hide a hidden element using Corvid

Updated: Feb 9


Tutorial Video

Learn how to create hover effect using a hidden box vs a Wix Lightbox.  This video will demonstrate how we call a window on Wix to open up a lightbox.  You will see the difference in speed and reaction time between the code and the hidden box vs the code and the Wix lightbox.  In the tutorial video, you will see us use examples of code that are triggered by the Properties Panel. We have added other sample code below that shows how to trigger by using the onReady section instead.


Follow Along #1

Tutorial Page

https://codequeen.wixsite.com/wixrgv-home


 

Good to Know #1

Coding using the Properties Panel



The Code to open a Lightbox on Click event



 import wixWindow from 'wix-window';

$w.onReady( () => {
 //on ready code
} );

export function buttonName_click(event) { 
 
wixWindow.openLightbox("LightboxName")
  .then( () => {
 //add other code here if needed
  } );
}
 


The Code to open a Lightbox on Hover event



import wixWindow from 'wix-window';

$w