-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
33 lines (29 loc) · 998 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
33
import "./style.css";
const contactMediums = document.querySelectorAll(".contact-medium__value");
contactMediums.forEach((value) => {
value.addEventListener("click", () => {
if (value.textContent.includes("Abohar")) {
navigator.clipboard.writeText(`Village - Dharampura,
District - Abohar,Tehsil - Fazilka, State - Punjab ,Country - Punjab`);
} else if (value.textContent.includes("this.is.kumar.prince")) {
navigator.clipboard.writeText("[email protected]");
} else {
navigator.clipboard.writeText(value.textContent);
}
});
});
const column2 = document.querySelectorAll(".column-2__section");
column2.forEach((value) => {
value.addEventListener("mouseenter", () => {
column2.forEach((newValue) => {
if (newValue !== value) {
newValue.style.opacity = "0.5";
}
});
});
value.addEventListener("mouseleave", () => {
column2.forEach((newValue) => {
newValue.style.opacity = "1";
});
});
});