-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathu1.js
30 lines (30 loc) · 1.15 KB
/
u1.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//var currentShown = 0;
//
//window.onload = function (){
// document.getElementById("title").innerHTML = 'Image: ' + currentShown;
// console.log(title);
// document.getElementById("img0").classList.remove("hideImage");
//};
//
//
//function previousImage() {
// let currentImage = "img" + currentShown;
// let imageCount = currentShown <= 0 ? 4 : currentShown - 1;
// let previousImage = "img" + imageCount;
// currentShown = imageCount;
// document.getElementById(currentImage).classList.add("hideImage");
// document.getElementById(previousImage).classList.remove("hideImage");
// document.getElementById("title").innerHTML = 'Image: ' + currentShown;
// console.log("prev: " + currentShown);
//}
//
//function nextImage() {
// let currentImage = "img" + currentShown;
// let nextImage = "img" + ((currentShown + 1)%5);
// currentShown = (currentShown + 1)%5;
// document.getElementById(currentImage).classList.add("hideImage");
// document.getElementById(nextImage).classList.remove("hideImage");
// console.log("next: " + currentShown);
// document.getElementById("title").innerHTML = 'Image: ' + currentShown;
//
//}