Multi-State Pre-Loader in Wix
- Larich Design
- Dec 15, 2020
- 1 min read
Updated: Dec 29, 2023
In this lesson, you will learn how to add a pre-loader to your Wix websites using multi-state boxes.

$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!
Comentarios