-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtribute.js
More file actions
36 lines (26 loc) · 955 Bytes
/
tribute.js
File metadata and controls
36 lines (26 loc) · 955 Bytes
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
const h1 = document.querySelector(".h1");
let got = new Audio("assets/GOT.mp3");
//allows viewing of background image on title click
h1.addEventListener("click", function() {
const body = document.querySelector(".body");
const contact = document.querySelector(".contact");
const header = document.querySelector(".header");
const main = document.querySelector(".main");
body.style.height = "100vh";
body.style.overflow = "hidden";
contact.style.visibility = "hidden";
header.style.visibility = "hidden";
main.style.visibility = "hidden";
//returns all to normal
setTimeout(function() {
body.style.height = "auto";
body.style.overflow = "auto";
contact.style.visibility = "visible";
header.style.visibility = "visible";
main.style.visibility = "visible";
}, 10000); //waits 10 seconds to run
});
//keeping variable out of function prevents echo
window.onclick = function() {
got.play();
};