-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
74 lines (50 loc) · 1.94 KB
/
script.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
'use strict';
function openprop(evt, propname) {
//declare variable
var i, tabcontent, tablinks;
//Get all elements with class="tabcontent" and hide them
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
// Get all elements with class="tablinks" and remove the class "active"
//tablinks = document.getElementsByClassName ("tablinks");
//for(i=0; i<tablinks.length; i++) {
// tablinks[i].className = tablinks[i].className.replace ("active","");
//}
// Show the current tab, and add an "active" class to the button that opened the tab
document.getElementById(propname).style.display = "block";
//evt.currentTarget.className += "active";
}
var slideindex = 1;
function showslide(n) {
var i, slides, nav;
slides = document.getElementsByClassName("myslides");
// nav = document.getElementsByClassName("navigator-link");
for (i = 0; i < slides.length; i++) {slides[i].style.display = "none"; }
// nav[i].className = nav[i].className.replace("active","");
slides[n - 1].style.display = "block";
// nav[n-1].className += "active";
}
var wslideindex = 0;
function slideshow() {
var j, wslides;
wslides = document.getElementsByClassName("work-slides");
for (j = 0; j < wslides.length; j++) {wslides[j].style.display = 'none'; }
wslideindex++;
if (wslideindex > wslides.length) {wslideindex = 1; }
wslides[wslideindex - 1].style.display = 'block';
setTimeout(slideshow(), 500);
}
slideshow();
function openmenu() {
var cond;
cond = document.getElementsByClassName("small-nav").style.display;
if (cond = "none") {
document.getElementsByClassName("small-nav").style.display = "flex" ;
}
else
{
document.getElementsByClassName("small-nav").style.display = "none" ;
}
}