(Created page with "<!DOCTYPE html> <html> <head> <title>Slideshow</title> </head> <body> <div class="slideshow-container"> <div class="mySlides fade"> <div class="numbertext">1 / 3</div>...") |
|||
Line 1: | Line 1: | ||
− | |||
<html> | <html> | ||
<head> | <head> | ||
Line 129: | Line 128: | ||
} | } | ||
</style> | </style> | ||
+ | |||
+ | </html> | ||
<script> | <script> | ||
Line 161: | Line 162: | ||
</body> | </body> | ||
− |
Revision as of 14:07, 7 July 2017
<script> var slideIndex = 1; showSlides(slideIndex);
function plusSlides(n) {
showSlides(slideIndex += n);
}
function currentSlide(n) {
showSlides(slideIndex = n);
}
function showSlides(n) {
var i; var slides = document.getElementsByClassName("mySlides"); var dots = document.getElementsByClassName("dot"); if (n > slides.length) {slideIndex = 1} if (n < 1) {slideIndex = slides.length} for (i = 0; i < slides.length; i++) { slides[i].style.display = "none"; } for (i = 0; i < dots.length; i++) { dots[i].className = dots[i].className.replace(" active", ""); } slides[slideIndex-1].style.display = "block"; dots[slideIndex-1].className += " active";
} </script>
</body>