- Creatively Nino
- May 10, 2020
- 1 min read
Here is the helpful code to get you going! Let me know if you need any more assistance in the comments on YouTube or contact me at the bottom today!
What Was Covered:
- Add lightbox (Be sure to check out the Wix lightbox tutorial - http://bit.ly/39n4JUB)
- Adding content and rearranging information to put on the lightbox
- Adding code to create a one-time popup
- Preview action to see if it is working properly
Code Snippet to follow along with the video:
Client-Side "SITE" Code
// For full API documentation, including code examples, visit https://wix.to/94BuAAs
import wixWindow from 'wix-window';
import {session} from 'wix-storage';
$w.onReady(function () {
//TODO: write your page related code here...
session.removeItem("popupPromotion")
if (!session.getItem("popupPromotion")) {
wixWindow.openLightbox("Announcement")
session.setItem("popupPromotion", "yes")
}
});
Comentarios