-
Notifications
You must be signed in to change notification settings - Fork 0
/
JS.js
36 lines (29 loc) · 944 Bytes
/
JS.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
const inputs = document.querySelectorAll(".input");
function focusFunc() {
let parent = this.parentNode;
parent.classList.add("focus");
}
function blurFunc() {
let parent = this.parentNode;
if (this.value == "") {
parent.classList.remove("focus");
}
}
inputs.forEach((input) => {
input.addEventListener("focus", focusFunc);
input.addEventListener("blur", blurFunc);
});
var btn = document.getElementById("submit-btn");
btn.addEventListener('click', function(e){
e.preventDefault()
alert("This is not setup yet, send a email manually")
})
const hamburger = document.querySelector(".hamburger");
hamburger.addEventListener('click', function() {
this.classList.toggle("is-active");
document.querySelector(".menu2").classList.toggle("active")
})
function removeMenu () {
hamburger.classList.toggle("is-active")
document.querySelector(".menu2").classList.toggle("active")
}