Hi @mileddwaihy, you can schedule showing the next slide using setTimeout()
… extending the example from your link:
// Declare a variable to hold the ID of the currently
// scheduled timeout
var scheduled = null;
// ...
function showSlides(n) {
// ...
// Clear the currently scheduled timeout so that the timeout
// resets after manually switching the slides
clearTimeout(scheduled);
// Set a new timeout to show the next slide after a given
// amount of time
scheduled = setTimeout(plusSlides, 5000, 1);
}
Edit: Whoops, x-post…