forked from VeronicaFM/veronica
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
109 lines (67 loc) · 2.06 KB
/
script.js
File metadata and controls
109 lines (67 loc) · 2.06 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
$(document).ready(function(){
if (screen.width >= 480) {
$('div.onePage').css('width','0vw');
$('a.toggled').click(function() {
var $dataName = $(this).data("name");
$('div.onePage').css('width','0vw');
$("#" + $dataName).css('width','49vw');
});
$('h1').click(function(){
$('div.onePage').css('width','0vw');
});
$('h1').click(function(){
$('div.projContent').css('height','0vh');
$('div.closingsection').css('display','none');
});
$('div.closingsection').click(function(){
$('div.projContent').css('height','0vh');
$('div.closingsection').css('display','none');
});
$('div.projContent').css('height','0vh');
$('h2.projtog').click(function() {
$('.projContent').animate({ scrollTop: 0 }, 'fast');
var $dataName1 = $(this).data("name");
$('div.closingsection').css('display','block');
$('div.projContent').css({
height: "0vh",
transition: "all 0.3",
});
$("#" + $dataName1).css({
height:"-webkit-min-content",
height:"-moz-min-content",
height:"min-content",
transition: "all 0.6s"
});
$('a.toggled').click(function(){
$('div.projContent').css('height','0vh');
$('#news').animate({ scrollTop: 0 }, 'fast');
$('div.closingsection').css('display','none');
})
});
};
if (screen.width <= 480) {
$('div.onePage').css('width','100vw');
$('div.onePage').css('display','none');
$('a.toggled').click(function() {
var $dataName = $(this).data("name");
$('div.onePage').css('display','none');
$("#" + $dataName).css('display','block');
});
$('h1').click(function(){
$('div.onePage').css('display','none');
});
};
var myIndex = 0;
carousel();
function carousel() {
var i;
var x = document.getElementsByClassName("mySlides");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
myIndex++;
if (myIndex > x.length) {myIndex = 1}
x[myIndex-1].style.display = "block";
setTimeout(carousel, 250);
}
});