-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathscript.js
More file actions
29 lines (24 loc) · 806 Bytes
/
script.js
File metadata and controls
29 lines (24 loc) · 806 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
var typed = new Typed('#typing', {
strings: ['Organized by the Students of KRMU'],
smartBackspace: true, // Default value
typeSpeed: 60,
backSpeed: 60,
loop: true,
});
window.addEventListener(
'scroll',
function () {
var navbar = document.getElementById("nav");
var logo = document.getElementById("logo");
navbar.classList.toggle('sticky', window.scrollY > 0);
logo.classList.toggle('img-logo', window.scrollY > 0);
},
)
let questions = document.querySelectorAll(".faq__question");
questions.forEach((question) => {
question.addEventListener("click", function () {
question.classList.toggle("faq__question_active");
const nextElement = question.nextElementSibling;
nextElement.classList.toggle("faq__panel_active");
});
});