-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
64 lines (64 loc) · 1.9 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
let click = 0;
let clickLeft=0;
btnRight.onclick=()=>{
if(click === 0){
shoeBasic.style.display="none";
shoeGreen.style.display="flex";
click = 1;
} else if(click === 1){
shoeOrange.style.display="flex";
shoeGreen.style.display="none";
click = 2;
} else if(click === 2){
shoeDarkblue.style.display="flex";
shoeOrange.style.display="none";
click = 3;
} else if(click === 3){
shoeBasic.style.display="flex";
shoeDarkblue.style.display="none";
click = 0;
}
}
btnLeft.onclick=()=>{
if(clickLeft === 0){
shoeDarkblue.style.display="flex";
shoeBasic.style.display="none";
clickLeft=1;
}else if(clickLeft === 1){
shoeDarkblue.style.display="none";
shoeOrange.style.display="flex";
clickLeft=2;
}else if(clickLeft===2){
shoeOrange.style.display="none";
shoeGreen.style.display="flex";
clickLeft=3;
}else if(clickLeft===3){
shoeGreen.style.display="none";
shoeBasic.style.display="flex";
clickLeft=0;
}
}
document.getElementById('card1').onmousemove=()=>{
shoeBasic.style.display="none";
shoeGreen.style.display="flex";
}
document.getElementById('card2').onmousemove=()=>{
shoeOrange.style.display="flex";
shoeBasic.style.display="none";
}
document.getElementById('card3').onmousemove=()=>{
shoeDarkblue.style.display="flex";
shoeBasic.style.display="none";
}
document.getElementById('card1').onmouseout=()=>{
shoeBasic.style.display="flex";
shoeGreen.style.display="none";
}
document.getElementById('card2').onmouseout=()=>{
shoeBasic.style.display="flex";
shoeOrange.style.display="none";
}
document.getElementById('card3').onmouseout=()=>{
shoeBasic.style.display="flex";
shoeDarkblue.style.display="none";
}