-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetodoLucas
43 lines (34 loc) · 1.33 KB
/
metodoLucas
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
/*
document.getElementById("imagemWhatsapp").addEventListener("mouseover", hideElement);
document.getElementById("imagemWhatsapp").addEventListener("mouseover", showElement);
//var verificacao = false;
if(e.element.mouseover == 0){
function hideElement(){
document.getElementById("imagemWhatsapp").style.transition = "all 0.3s";
document.getElementById("imagemWhatsapp").style.display = "none";
}
}else{
function showElement(){
document.getElementById("imagemWhatsapp").style.transition = "all 0.3s";
document.getElementById("imagemWhatsapp").style.display = "block";
}
}
document.querySelector("#imagemWhatsapp").addEventListener("mouseover", awesomeFunction);
const state = {
box2: {
isMouseOver: true,
}
}
function awesomeFunction() {
console.log(state.box2.isMouseOver);
if(state.box2.isMouseOver) {
document.querySelector("#textoAlt").style.opacity = "1";
document.querySelector("#imagemWhatsapp").style.opacity = "0";
state.box2.isMouseOver = true;
} else {
document.querySelector("#textoAlt").style.opacity = "0";
document.querySelector("#imagemWhatsapp").style.opacity = "1";
state.box2.isMouseOver = false;
}
}
**/