-
Notifications
You must be signed in to change notification settings - Fork 55
/
landingPage.js
67 lines (55 loc) · 1.46 KB
/
landingPage.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
const audio = document.getElementById("backgroundMusic");
const audioQuery = document.querySelector("audio");
window.addEventListener("DOMContentLoaded", event => {
audioQuery.volume = 1;
audioQuery.play();
});
function audioController() {
if (!audio.paused) {
audio.pause();
}
else {
audio.play();
}
}
imageTracker = "i"
function imageChange() {
var image = document.getElementById("audioController");
if (imageTracker == "i"){
image.src = "resources/audioControllerOff.png"
imageTracker = "I"
}
else {
image.src = "resources/audioControllerOn.png"
imageTracker = "i"
}
}
const menuBtn = document.querySelector('.menuHamburger')
let menuOpen = false;
menuBtn.addEventListener('click', () => {
if(!menuOpen) {
menuBtn.classList.add('open');
menuOpen = true;
} else {
menuBtn.classList.remove('open');
menuOpen = false;
}
});
const list = document.querySelector('.rightBarStuff');
menuBtn.addEventListener('click', () => {
list.classList.toggle('show');
});
const qq = document.querySelector(".dropdownContent");
function s() {
qq.style.display = "flex";
}
function c() {
qq.style.display = "none";
}
function showOrHide() {
if (qq.style.display === "none") {
s()
} else {
c()
}
}