-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
32 lines (23 loc) · 969 Bytes
/
main.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
window.addEventListener("DOMContentLoaded", init);
// make buttons on the landing page to links
function init(){
document.querySelector('.introBtn').addEventListener('click', () => {
location.href = "form_p/form.html";
})
document.querySelector('.otherGamesBtn').addEventListener('click', () =>{
location.href = 'spillejhornet.html';
})
}
// create the burger menu for the mobile version
const menuBtn = document.querySelector(".menuBtn");
menuBtn.addEventListener("click", openNav);
function openNav() {
// document.querySelector(".upperMobileNav").classList.remove = "hidden";
// document.querySelector("#mobileNav.overlay").classList.remove = "hidden";
document.getElementById("mobileNav").style.height = "80%";
document.querySelector(".menuBtn").style.display = "none";
}
function closeNav() {
document.getElementById("mobileNav").style.height = "0%";
document.querySelector(".menuBtn").style.display = "block";
}