-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
61 lines (54 loc) · 1.48 KB
/
script.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
// navbar
const menu = document.querySelector('.menu');
const navbar = document.querySelector('.navbar');
// const navBarlist =document.querySelector('.nav-list');
menu.addEventListener('click',()=>{
navbar.classList.toggle('change')
menu.classList.toggle('change')
// navBarlist.classList.add('.change.nav-link')
})
// End of Navbr
//video play pause
const video = document.querySelector('.video');
const btn = document.querySelector('.buttons i');
const bar = document.querySelector('.video-bar');
const playpause = () =>{
if(video.paused){
video.play()
btn.className = 'far fa-pause-circle'
video.style.opacity = '.7'
}else{
video.pause()
btn.className = 'far fa-play-circle'
video.style.opacity = '.3'
}
}
btn.addEventListener('click', () => {
playpause()
})
video.addEventListener('timeupdate', () => {
// console.log(video.currentTime, video.duration)
const barWidth = video.currentTime / video.duration
bar.style.width = `${barWidth * 100 }%`
if(video.ended){
btn.className = 'far fa-play-circle'
video.style.opacity ='.3'
}
})
// Section3 pricing cards
var swiper = new Swiper(".mySwiper", {
effect: "coverflow",
grabCursor: true,
centeredSlides: true,
slidesPerView: "auto",
coverflowEffect: {
rotate: 70,
stretch: 0,
depth: 100,
modifier: 1,
slideShadows: true,
},
// pagination: {
// el: ".swiper-pagination",
// },
});