Jump to content

Narcis Velicescu

  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Narcis Velicescu

  • Rank
  1. Thank you so much, that did the trick!! The code below does exactly what is desired: if (slideIndex >= slides.length) { document.getElementsByClassName("next")[0].style.display = "none"; } else { document.getElementsByClassName("next")[0].style.display = "inline"; } if (slideIndex <= 1) { document.getElementsByClassName("prev")[0].style.display = "none"; } else { document.getElementsByClassName("prev")[0].style.display = "inline"; }
  2. Thank you for the quick reply. Not knowing how to code, I did some research based on your suggestion and came up with the following replacements for the fourth and fifth lines in showSlides. However, the prev and next buttons still show up. if (slideIndex > slides.length) { document.getElementByClassName("next").style.display = "block"; } if (slideIndex < 1) { document.getElementByClassName("prev").style.display = "none" } the CSS is where the priv and next classes are defined: /* Next & previous buttons */ .
  3. Hello, I've been adapting the code from the Slideshow how-to (https://www.w3schools.com/howto/howto_js_slideshow.asp) for my site. However, I would like for the previous arrow to be hidden in the first image and for the next arrow to be hidden in the last image. In other words, no looping. This is for the manual slideshow. I'm not a coding expert, I adapt already existing code, so I'm not sure where to begin. Thank you! The JavaScript from the how-to page is: var slideIndex = 1;showSlides(slideIndex);function plusSlides(n) { showSlides(slideIndex += n);}functio
  • Create New...