2024-01-30 12:18:28 +01:00
|
|
|
// Open the Modal
|
|
|
|
|
function openModal() {
|
2024-01-30 22:47:35 +01:00
|
|
|
document.getElementsByClassName("snap-lightbox")[0].style.display = "block";
|
2024-01-30 12:18:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Close the Modal
|
|
|
|
|
function closeModal() {
|
2024-01-30 22:47:35 +01:00
|
|
|
document.getElementsByClassName("snap-lightbox")[0].style.display = "none";
|
2024-01-30 12:18:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var slideIndex = 1;
|
|
|
|
|
showSlides(slideIndex);
|
|
|
|
|
|
|
|
|
|
// Next/previous controls
|
|
|
|
|
function plusSlides(n) {
|
|
|
|
|
showSlides(slideIndex += n);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Thumbnail image controls
|
|
|
|
|
function currentSlide(n) {
|
|
|
|
|
showSlides(slideIndex = n);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showSlides(n) {
|
|
|
|
|
var i;
|
2024-01-30 22:47:35 +01:00
|
|
|
var slides = document.getElementsByClassName("snap-lightbox-inner");
|
2024-01-30 12:18:28 +01:00
|
|
|
if (n > slides.length) { slideIndex = 1 }
|
|
|
|
|
if (n < 1) { slideIndex = slides.length }
|
|
|
|
|
for (i = 0; i < slides.length; i++) {
|
|
|
|
|
slides[i].style.display = "none";
|
|
|
|
|
}
|
2024-01-30 14:39:01 +01:00
|
|
|
slides[slideIndex - 1].style.display = "inline-block";
|
2024-01-30 12:18:28 +01:00
|
|
|
}
|