Line 184: | Line 184: | ||
console.log(slides.length); | console.log(slides.length); | ||
var slides = document.getElementsByClassName("mySlides"); | var slides = document.getElementsByClassName("mySlides"); | ||
− | var dots = document.getElementsByClassName("dot"); | + | //var dots = document.getElementsByClassName("dot"); |
if (n > slides.length) {slideIndex = 1} | if (n > slides.length) {slideIndex = 1} | ||
if (n < 1) {slideIndex = slides.length} | if (n < 1) {slideIndex = slides.length} | ||
Line 190: | Line 190: | ||
slides[i].style.display = "none"; | slides[i].style.display = "none"; | ||
} | } | ||
− | for (i = 0; i < dots.length; i++) { | + | //for (i = 0; i < dots.length; i++) { |
− | + | // dots[i].className = dots[i].className.replace(" active", ""); | |
− | } | + | //} |
slides[slideIndex-1].style.display = "block"; | slides[slideIndex-1].style.display = "block"; | ||
− | dots[slideIndex-1].className += " active"; | + | //dots[slideIndex-1].className += " active"; |
} | } | ||
Line 214: | Line 214: | ||
var slides = document.getElementsByClassName("mySlides2"); | var slides = document.getElementsByClassName("mySlides2"); | ||
console.log(slides.length); | console.log(slides.length); | ||
− | var dots = document.getElementsByClassName("dot"); | + | //var dots = document.getElementsByClassName("dot"); |
if (n > slides.length) {slideIndex = 1} | if (n > slides.length) {slideIndex = 1} | ||
if (n < 1) {slideIndex2 = slides.length} | if (n < 1) {slideIndex2 = slides.length} | ||
Line 220: | Line 220: | ||
slides[i].style.display = "none"; | slides[i].style.display = "none"; | ||
} | } | ||
− | + | // for (i = 0; i < dots.length; i++) { | |
− | + | // dots[i].className = dots[i].className.replace(" active", ""); | |
− | } | + | //} |
slides[slideIndex2-1].style.display = "block"; | slides[slideIndex2-1].style.display = "block"; | ||
− | dots[slideIndex2-1].className += " active"; | + | //dots[slideIndex2-1].className += " active"; |
} | } | ||
</script> | </script> |
Revision as of 20:23, 16 October 2018