-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.js
More file actions
37 lines (30 loc) · 873 Bytes
/
scripts.js
File metadata and controls
37 lines (30 loc) · 873 Bytes
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
// Mobile/Tablet Nav Menu
let navBtn = document.getElementById('nav-btn');
let nav = document.getElementById('nav-right');
navBtn.addEventListener('click', () => {
console.log(window.getComputedStyle(nav, null).getPropertyValue("top"));
if (window.getComputedStyle(nav, null).getPropertyValue("top") == '-450px') {
nav.style.top = "80px";
} else {
nav.style.top = "-450px";
}
});
// Testimonial Swiper
let leftBtn = document.getElementById('left-btn');
const swiper = new Swiper('.swiper', {
// Optional parameters
slidesPerView: "auto",
slideActiveClass: 'section__testimonial-slide--active',
centeredSlides: true,
spaceBetween: 40,
autoplay: {
delay: 2500,
disableOnInteraction: false,
},
// Navigation arrows
navigation: {
prevEl: '.bi-chevron-left',
nextEl: '.bi-chevron-right',
disabledClass: 'section__swiper-btn--disabled',
},
});