Hello, I'm going through a lot of difficulties to make my slideshow, the best I got was an automatic slideshow, but I'd like to include prev / next arrows to control and buttons underneath as well, can anyone 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;