-
Notifications
You must be signed in to change notification settings - Fork 1
/
intro.js
54 lines (50 loc) · 2.17 KB
/
intro.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
var buttonActive = document.querySelector('.button button')
buttonActive.onclick = function(){
var boxFlower = document.querySelector('.flower-img:nth-child(1)')
var boxFlower2 = document.querySelector('.flower-img:nth-child(2)')
var boxFlower3 = document.querySelector('.flower-img:nth-child(3)')
var boxFlower4 = document.querySelector('.flower-img:nth-child(4)')
var boxFlower5 = document.querySelector('.flower-img:nth-child(5)')
var boxFlower6 = document.querySelector('.flower-img:nth-child(6)')
var circleActive = document.querySelector('.circle')
var boxsliderimg1 = document.querySelector('.box-slider_img1')
var catActive = document.querySelector('.cat')
var numberActive = document.querySelector('.box-number')
var buttonDisplay = document.querySelector('.box-button')
var rhombus1 = document.querySelector('.rhombus:nth-child(1)')
var rhombus2 = document.querySelector('.rhombus:nth-child(2)')
var rhombusImg = document.querySelector('.rhombus-img')
var mailActive = document.querySelector('.mail')
boxFlower.classList.toggle("active")
boxFlower2.classList.toggle("active")
boxFlower3.classList.toggle("active")
boxFlower4.classList.toggle("active")
boxFlower5.classList.toggle("active")
boxFlower6.classList.toggle("active")
circleActive.classList.toggle("active")
boxsliderimg1.classList.toggle("active")
catActive.classList.toggle("active")
numberActive.classList.toggle("active")
buttonDisplay.classList.toggle("active")
rhombus1.classList.toggle("active")
rhombus2.classList.toggle("active")
rhombusImg.classList.toggle("active")
mailActive.classList.toggle("active")
}
var mail = document.querySelector(".mail")
var slider3 = document.querySelector(".slider3")
var closeSlider3 = document.querySelector(".fa-xmark")
mail.onclick = function(){
slider3.classList.add("active")
}
closeSlider3.addEventListener('click', function(){
slider3.classList.remove('active')
})
// ------audio------------
var buttonSong = document.querySelector('.button')
var mySong = document.getElementById("song")
buttonSong.onclick= function(){
if(mySong.paused){
mySong.play()
}
}