forked from InnerveSummerOfCode/ISOC-23-WEBD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathisoc.js
54 lines (45 loc) · 1.19 KB
/
isoc.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
const hamburger = document.querySelector("#hamburger");
const main_nav = document.querySelector(".main-nav");
hamburger.addEventListener("click", ()=>{
if(!hamburger.classList.contains("cross")){
main_nav.classList.add("show-nav");
hamburger.classList.add("cross");
}
else {
main_nav.classList.remove("show-nav");
hamburger.classList.remove("cross");
}
})
const swiper = new Swiper('.swiper', {
// Optional parameters
direction: 'horizontal',
loop: true,
// If we need pagination
/*pagination: {
el: '.swiper-pagination',
type: "bullets",
},*/
effect : "cube",
cubeEffect : {
slideShows : false,
},
autoplay:{
delay: 2000,
}
});
// ShareBtn Event Handling
const shareBtn = document.querySelectorAll(".shareBtn");
shareBtn.forEach( (el)=> el.addEventListener("click", event => {
navigator.share({
title: 'WebShare API Demo',
url: 'https://codepen.io/ayoisaiah/pen/YbNazJ'
}).then(() => {
console.log('Thanks for sharing!');
})
.catch(console.error);
}));
// Nav Bar Options click event handling
/*main_nav.children.forEach((el)=>{
el.addEventListener("click", ()=>{
})
})*/