-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFuturaJavaScript.js
More file actions
86 lines (63 loc) · 2.37 KB
/
FuturaJavaScript.js
File metadata and controls
86 lines (63 loc) · 2.37 KB
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
83
84
85
86
const slide = document.querySelector('#slide')
const text = document.querySelector('#textão')
const point1 = document.querySelector('#p1')
const point2 = document.querySelector('#p2')
const point3 = document.querySelector('#p3')
const nextbutton = document.querySelector('#next')
const pontos = document.querySelector('#pontinhos')
let index = 3
console.log(index)
let pass = setInterval(function (){if (index == 7){index = 3}
else(index +=2)
console.log(index)
pontos.childNodes[index].click()},3000)
function nextbuttonItem (){
clearInterval(pass)
if (index == 7){index = 3}
else(index +=2)
console.log(index)
pontos.childNodes[index].click()
}
/*let pass = setInterval(function (){if (point2.style.background == 'yellow') {pontos.childNodes[7].click() }
else if (point3.style.background == 'yellow'){pontos.childNodes[3].click()}
else(pontos.childNodes[5].click())},3000)
function nextbuttonItem (){
clearInterval(pass)
if (point2.style.background == 'yellow') {pontos.childNodes[7].click() }
else if (point3.style.background == 'yellow'){pontos.childNodes[3].click()}
else(pontos.childNodes[5].click())
}*/
nextbutton.addEventListener('click',nextbuttonItem)
function ponto1(){
index = 3
clearInterval(pass)
text.innerHTML = 'Melhor site de tecnologia do Brasil'
slide.style.backgroundImage= "url('conteudo/Seções/TNT\ Texture.jpg')"
point1.style.background = 'yellow'
point2.style.background = '#FFFCC6'
point3.style.background = '#FFFCC6'
console.log('funfou')
}
point1.addEventListener('click',ponto1)
function ponto2(){
index = 5
clearInterval(pass)
text.innerHTML = 'Veja Cursos Profissionalizantes Gratuitos'
slide.style.background= 'rgb(45, 98, 168)'
point2.style.background = 'yellow'
point1.style.background = '#FFFCC6'
point3.style.background = '#FFFCC6'
console.log('funfou')
}
point2.addEventListener('click',ponto2)
function ponto3(){
index = 7
clearInterval(pass)
text.innerHTML = 'Conheça eventos especiais de tecnologia'
slide.style.background= 'black'
point3.style.background = 'yellow'
console.log('funfou')
point2.style.background = '#FFFCC6'
point1.style.background = '#FFFCC6'
}
point3.addEventListener('click',ponto3)