0
Hello, I’m going through a lot of difficulties to make my slideshow, the best I got was an automatic slideshow, only I’d like to include Prev/next arrows to control and buttons below too, someone can help me?
HTML:
<div class="slideshow-container">
<img name="slide" style="width:100%"/>
</div>
<br/>
CSS:
*{box-sizing: border-box}
.slideshow-container {
max-width: 1000px;
position: relative;
margin: auto;
}
JS:
var i = 0;
var images = [];
var time = 3000;
images[0] = 'imagens/img1.jpg';
images[1] = 'imagens/img2.jpg';
images[2] = 'imagens/img3.png';
function changeImg(){
document.slide.src = images[i];
if(i < images.length - 1){
i++;
}else {
i = 0;
}
setTimeout("changeImg()", time);
}
window.onload = changeImg;
Of a look at How to js slideshow - w3schools.com if you need more ideas
– Mark Vaaz