Slideshow

This page need more contributions.
Login or register to contribute to the docs.

<div class="ss-content ss-disp-container">
  <img class="ss-w-10 slides" src="imgf.jpg">
  <img class="ss-w-10 slides" src="imgs.jpg">
  <img class="ss-w-10 slides" src="imgt.jpg">
  <img class="ss-w-10 slides" src="imgf.jpg">

  <button class="ss-button ss-bg-black ss-disp-left" onclick="plusDivs(-1)">&amp;#10094;</button>
  <button class="ss-button ss-bg-black ss-disp-right" onclick="plusDivs(1)">&amp;#10095;</button>
</div>
var slideIndex = 1;
showDivs(slideIndex);

function plusDivs(n) {
  showDivs(slideIndex += n);
}

function showDivs(n) {
  var i;
  var x = document.getElementsByClassName("slides");
  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";  
}