Hi, I have a multistate box slideshow on my homepage and the code has stopped working.
The slideshow should automatically cycle through the states but goes blank after the first transition. The code hasn’t changed and was working fine for months.
I got the code from an excellent video by [WixStudioTips]
The velo help team haven’t been able to say why this is happening so if anyone can help or provide an alternative code to achieve the same thing it would be massively appreciated.
I know the layouter will achieve a similar effect but I think the multistae box way looks a lot better (if it works).
This is the current code:
$w.onReady(function () {
var states = ['state1', 'state2', 'state3', 'state4', 'state5','state6', 'state7'];
var stateNumber = 0;
function slideShow() {
$w('#multiStateBox1').changeState(states[stateNumber]);
if (stateNumber < states.length - 1) {
stateNumber++;
} else {
stateNumber = 0;
}
setTimeout(slideShow, 5000);
}
slideShow();
});
Many thanks in advance