-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
47 lines (35 loc) · 1.06 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
var typed = new Typed("#element", {
strings: ["Web designer and", "Web developer."],
typeSpeed: 60,
});
function scrollToSection(sectionId) {
const section = document.getElementById(sectionId);
section.scrollIntoView({ behavior: "smooth" });
}
let popContainer = document.querySelector("#emailPopup");
popContainer.onclick = (event) => {
event.stopPropagation();
document.getElementById("popupContainer").style.display = "block";
};
window.addEventListener("click", function (event) {
var popupContainer = document.getElementById("popupContainer");
if (
event.target !== popupContainer &&
!popupContainer.contains(event.target)
) {
popupContainer.style.display = "none";
}
});
var nav = document.querySelector("#navLinks");
let opend = document.querySelector(".bar")
let closed = document.querySelector(".cross")
function showMenu() {
nav.style.right = 0;
}
function hideMenu() {
nav.style.right = "-230px";
}
let widthd = screen.width;
if(widthd<=700){
closed.style.display = 'block';
}