We’re working with Wix to create a visitor information system for a rural hospital. I need to set “How long between images?” duration longer than 30 seconds (current maximum) because we’ll have text information on the slide (some people are slower readers). Is there any way I can override this setting to be longer, perhaps 120 seconds, or more? This is a critical issue for our administrators.
Thank you for your help,
Debra
Hello
yes you can set the time as you wish using code and that would be as follows:
-
set the Auto play for the slider off .
-
use .pause() and .play() to manage items change.
-
use onCurrentItemChanged event to set duration.
-
to set he duration you can use setTimeout function.
here’s a code to show you how :
$w.onReady(function () {
//to set the duration of change for the first image
if ($w('#gallery1').isPlaying) {
$w('#gallery1').pause()
} else {
setTimeout(function () {
$w('#gallery1').play()
}, 120000); // 120 seconds
}
});
// whenever an item changes it pauses then waits a while before it plays it again
export function gallery1_currentItemChanged(event, $w) {
$w('#gallery1').pause();
setTimeout(function () {
$w('#gallery1').play()
}, 120000);
}
click here to know more about pause and play functions.
Massa
Massa you are awesome!! This looks like just what I need. Thank you so much! I’m sure this will help other users too.
Thank you for getting me started :-).
Debra