-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
34 lines (33 loc) · 938 Bytes
/
index.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
31
32
33
34
function carousel() {
var imgCarousel = {
images: ["assets/images/faceShot.jpg", "assets/images/ncwit1.JPG", "assets/images/ncwit2.JPG"],
currentImg: 0
};
setInterval(function() {
++imgCarousel.currentImg;
if (imgCarousel.currentImg > 2) {
imgCarousel.currentImg = 0;
}
document.getElementById("imgCarousel").src = imgCarousel.images[imgCarousel.currentImg];
}, 6000);
}
carousel();
function toggleNavigation() {
if (document.getElementById("navigation").style.display == "none") {
document.getElementById("navigation").style.display = "inline-block";
} else {
document.getElementById("navigation").style.display = "none";
}
}
toggleNavigation();
function navDrop(id) {
document.getElementById(id).style.visibility = "visible";
}
function navLift(id) {
document.getElementById(id).style.visibility = "hidden";
}
navLift("list1");
navLift("list2");
navLift("list3");
navLift("list4");
navLift("list5");