-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
26 lines (20 loc) · 767 Bytes
/
Copy pathscript.js
File metadata and controls
26 lines (20 loc) · 767 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
// Mail
const emailElement = document.getElementById("email");
emailElement.addEventListener("click", function () {
const email = emailElement.textContent;
const subject = "Betreff deiner E-Mail";
const body = "Hier ist der Text deiner E-Mail.";
const mailtoLink = `mailto:${email}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
window.location.href = mailtoLink;
});
// Interests
const interHoverElements = document.querySelectorAll(".interHover");
interHoverElements.forEach((element) => {
const icon = element.previousElementSibling;
icon.addEventListener("mouseenter", () => {
element.classList.add("active");
});
icon.addEventListener("mouseleave", () => {
element.classList.remove("active");
});
});