top of page

Multi-State Pre-Loader in Wix

In this lesson, you will learn how to add a pre-loader to your Wix websites using multi-state boxes.

Before you use the code, here is a quick video showing you how to set it up on your website!

Now that you know how to set up your pre-loader, you can find the code below:


$w.onReady(function () { $w('#mediaPlayer1').onEnded(() => { $w('#PreloaderStateBox').changeState("Intro"); }); $w('#button1').onClick(() => { $w('#PreloaderStateBox').changeState("Expanded"); }); $w('#button20').onClick(() => { $w('#PreloaderStateBox').changeState("Intro"); }); });


Make sure if your elements have different names, that you change them to match the code. Or visa versa.

Have Fun!

bottom of page