Hello,
I've been looking for a working little & simple Java Script Image Slider for a bit longer.
I found something now and it works pretty good. But it would help me very much, if someone could explain to me quite briefly the functionality. (I know it's probably really easy)
Thanks in advance!
My Code:
Code:var slideIndex = 1; showDivs(slideIndex); function plusDivs(n) { var y = document.getElementById("slide1"); y.style.display = "none";. showDivs(slideIndex += n); } function showDivs(n) { var i; var x = document.getElementsByClassName("mySlides"); if (n > x.length) {slideIndex = 1} if (n < 1) {slideIndex = x.length} for (i = 0; i < x.length; i++) { x[i].style.display = "none"; } x[slideIndex-1].style.display = "block"; }