/
epc.js
82 lines (72 loc) · 2.15 KB
/
epc.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
var indicator_btn = document.getElementsByClassName("indicator-btn")
var slide = document.getElementById("slide")
indicator_btn[0].onclick = function(){
slide.style.transform = "translateX(0%)"
for(i = 0; i < 10; i++){
indicator_btn[i].classList.remove("active")
}
this.classList.add("active")
}
indicator_btn[1].onclick = function(){
slide.style.transform = "translateX(-10%)"
for(i = 0; i < 10; i++){
indicator_btn[i].classList.remove("active")
}
this.classList.add("active")
}
indicator_btn[2].onclick = function(){
slide.style.transform = "translateX(-20%)"
for(i = 0; i < 10; i++){
indicator_btn[i].classList.remove("active")
}
this.classList.add("active")
}
indicator_btn[3].onclick = function(){
slide.style.transform = "translateX(-30%)"
for(i = 0; i < 10; i++){
indicator_btn[i].classList.remove("active")
}
this.classList.add("active")
}
indicator_btn[4].onclick = function(){
slide.style.transform = "translateX(-40%)"
for(i = 0; i < 10; i++){
indicator_btn[i].classList.remove("active")
}
this.classList.add("active")
}
indicator_btn[5].onclick = function(){
slide.style.transform = "translateX(-50%)"
for(i = 0; i < 10; i++){
indicator_btn[i].classList.remove("active")
}
this.classList.add("active")
}
indicator_btn[6].onclick = function(){
slide.style.transform = "translateX(-60%)"
for(i = 0; i < 10; i++){
indicator_btn[i].classList.remove("active")
}
this.classList.add("active")
}
indicator_btn[7].onclick = function(){
slide.style.transform = "translateX(-70%)"
for(i = 0; i < 10; i++){
indicator_btn[i].classList.remove("active")
}
this.classList.add("active")
}
indicator_btn[8].onclick = function(){
slide.style.transform = "translateX(-80%)"
for(i = 0; i < 10; i++){
indicator_btn[i].classList.remove("active")
}
this.classList.add("active")
}
indicator_btn[9].onclick = function(){
slide.style.transform = "translateX(-90%)"
for(i = 0; i < 10; i++){
indicator_btn[i].classList.remove("active")
}
this.classList.add("active")
}