top of page
This website was created by Wix Fix

Multi-State Pre-Loader in Wix

  • Mar 12, 2023
  • 1 min read

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!

Comments


bottom of page