I want to add three Multi State Box into a single page in my website and I have written a code for one multi State box and it is working fine. But when I have added one more multi state box into that page and written a same code. But it is not showing for second one.
Kindly suggest me how shall I code the given below code to get multiple Multi state box in a Page.
code:
// For full API documentation, including code examples, visit Velo API Reference - Wix.com
$w.onReady( function () {
//TODO: write your page related code here…
setTimeout(() => {
$w(“#PreloaderStateBox”).changeState(“Intro1”)
}, 9000)
I have written one code for Multi State Box and it is working fine.
the code is:
$w.onReady( function () {
//TODO: write your page related code here…
setTimeout(() => {
$w(“#PreloaderStateBox”).changeState(“Intro1”)
}, 9000)
BUT I WANT TO ADD ONE MORE MULTI STATE BOX INTO THE SAME PAGE
for which the code is:
$w.onReady( function () {
//TODO: write your page related code here…
setTimeout(() => {
$w(“#statebox1”).changeState(“state1”)
}, 9000)
Your current code should work as is (assuming that you wrote the element properties correctly).
But to write it even better you can put all the onClick() functions inside a single $w.onReady().
No need to have more than one $w.onReady() per page.