-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
27 lines (23 loc) · 1.03 KB
/
index.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
let isScrolling
const website = document.getElementById("website")
const scrollbar = document.getElementById("scrollbar-tab")
window.onload = function(){
let icons = document.getElementsByClassName("skills-icon")
for (let i=0; i < icons.length; i++){
icons[i].addEventListener("click", () => {
if (icons[i].querySelector(".skills-icon-wrapper").style.transform == "rotateY(180deg)"){
icons[i].querySelector(".skills-icon-wrapper").style.transform = "rotateY(0deg)"
}
else{
icons[i].querySelector(".skills-icon-wrapper").style.transform = "rotateY(180deg)"
}
})
}
}
document.getElementById("contact-form").addEventListener("submit", submitForm)
function submitForm(event){
event.preventDefault()
let url = "mailto:[email protected]?subject="+encodeURIComponent(document.getElementById("contact-name").value) + "&body="+encodeURIComponent(document.getElementById("contact-message").value)
console.log(url)
window.open(url)
}