-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswitch.js
63 lines (54 loc) · 1.09 KB
/
switch.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
var l1=1;
function changeBackground(){
if(l1==1){
var n=document.getElementById('university');
n.id="u1";
var m=document.getElementById('body')
m.className="b1";
l1++;
}
else{
var n=document.getElementById('u1');
n.id="university";
var m=document.getElementById('body')
m.className="b2";
l1=1;
}
}
var e=document.getElementById('switch');
e.addEventListener('click', changeBackground, false);
var l=1;
var menu=document.getElementById('menuLogo');
function disp()
{
var displays1=document.getElementsByTagName('ul');
var disp1=document.getElementsByTagName('li');
var width=window.innerWidth;
if(l==1&&width<1000)
{
alert(width);
displays1[0].id="menu_inlineR";
l++;
}
else if(l==1)
{
displays1[0].id="menu_inline";
l++;
}
else{
displays1[0].id="menuXinline";
l=1;
}
}
menu.addEventListener('click',disp,false);
do{
var i=1;
var sshow=document.getElementsByClassName("slideshow-class-goes-here");
for(var q=1;q<3;q++)
{
var n1=setInterval(function(){sshow[0].id="slideshow-class-goes-here"+i;i++;
clearInterval(n1);
},5000);
}
c++;
}while(c>50);