-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
136 lines (121 loc) · 2.89 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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
document.addEventListener("keydown", event => {
if (event.isComposing || event.keyCode === 27) {
hideModal();
}
});
function showNav() {
document.getElementById("mobile-nav").style.display = "flex";
document.getElementById("mobile-nav-close").style.display = "block";
}
function hideNav() {
document.getElementById("mobile-nav").style.display = "none";
document.getElementById("mobile-nav-close").style.display = "none";
}
function showFooter() {
$("#footer-emails").slideDown({
start: function() {
$(this).css({
display: "inline-flex"
});
}
});
$("#footer-links").slideDown({
start: function() {
$(this).css({
display: "inline-flex"
});
}
});
$("#social").slideDown({
start: function() {
$(this).css({
display: "inline-flex"
});
}
});
document.getElementById("footer-expand-up").style.display = "none";
document.getElementById("footer-expand-down").style.display = "flex";
$("#mobile-footer-contact-us").hide();
}
function hideFooter() {
$("#footer-emails").slideUp({
end: function() {
$(this).css({
display: "none"
});
}
});
$("#footer-links").slideUp({
end: function() {
$(this).css({
display: "none"
});
}
});
$("#social").slideUp({
end: function() {
$(this).css({
display: "none"
});
}
});
document.getElementById("footer-expand-up").style.display = "flex";
document.getElementById("footer-expand-down").style.display = "none";
$("#mobile-footer-contact-us").show();
}
function showModal() {
$("#modal-holder")
.show(250)
.attr("aria-hidden", "false");
$("body").addClass("overflow-none");
}
function hideModal() {
$("#modal-holder")
.hide(250)
.attr("aria-hidden", "true");
$("body").removeClass("overflow-none");
}
$(document).ready(() => {
$(".accordian").click(function() {
$(this)
.next(".panel")
.slideToggle(100);
const text = $(this)
.children("h4")
.eq(1)
.text();
$(this)
.children("h4")
.eq(1)
.text(text === "+" ? "-" : "+");
});
var scroll_start = 0;
var startchange = $("#info");
var offset = startchange.offset();
$(document).scroll(function() {
scroll_start = $(this).scrollTop();
if (scroll_start > offset.top) {
$("nav").addClass("nav-scrolled");
$("#mobile-nav-scrolled").removeClass("hide");
$("#mobile-nav-scrolled").addClass("mobile-nav-scrolled");
} else {
$("nav").removeClass("nav-scrolled");
$("#mobile-nav-scrolled").addClass("hide");
$("#mobile-nav-scrolled").removeClass("mobile-nav-scrolled");
}
});
$("#modal-bg")
.click(() => {
hideModal();
})
.children()
.click(function(e) {
e.stopPropagation();
});
});
function hideFS() {
$("#fullscreen").hide();
}
function showFS() {
$("#fullscreen").show();
}