Answer the question
In order to leave comments, you need to log in
How to change slideshow animation?
There is this html code, with js script. Everything works well, but the slide transition animation is too sharp.. Please help, how to make the animation smooth, what would be from left to right?
function showSlides() {
var i;
var slides = document.getElementsByClassName("mySlides");
var dots = document.getElementsByClassName("dot");
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
slideIndex++;
if (slideIndex > slides.length) {slideIndex = 1}
for (i = 0; i < dots.length; i++) {
dots[i].className = dots[i].className.replace(" active", "" );
dots[slideIndex-1].className += "active";
setTimeout(showSlides, 5000); // Change image every 2 seconds
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question