gallery
This commit is contained in:
parent
67784ff09d
commit
a90c208d65
5 changed files with 220 additions and 12 deletions
4
js/jquery.min.js
vendored
Normal file
4
js/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
36
js/popup.js
Normal file
36
js/popup.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
function openModal() {
|
||||
document.getElementById("myModal").style.display = "block";
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
document.getElementById("myModal").style.display = "none";
|
||||
}
|
||||
|
||||
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("demo");
|
||||
var captionText = document.getElementById("caption");
|
||||
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";
|
||||
captionText.innerHTML = dots[slideIndex-1].alt;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue