forked from Thebeast01/Pre-Final-Brain-Bytes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
39 lines (31 loc) · 1.13 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
'use strict';
const hamburgerNavigation = document.querySelector('.hidden');
const hamburgerButton = document.querySelector('.hamburger');
hamburgerButton.addEventListener('click', () => {
if (hamburgerNavigation.className == 'hidden') {
hamburgerNavigation.classList.remove('hidden');
} else {
hamburgerNavigation.classList.add('hidden');
}
});
// slider script
var slides = document.querySelectorAll('.slide');
var currentSlide = 0;
var slideInterval = setInterval(nextSlide, 3000);
function nextSlide() {
slides[currentSlide].style.display = 'none';
currentSlide = (currentSlide + 1) % slides.length;
slides[currentSlide].style.display = 'block';
}
function changeSlide(n) {
slides[currentSlide].style.display = 'none';
currentSlide = (currentSlide + n + slides.length) % slides.length;
slides[currentSlide].style.display = 'block';
}
//Slider script ends here
// Login popup starts here
// Write review button
const reviewButton = document.querySelector('.my-button');
reviewButton.addEventListener('click', () => {
window.location.href = '/FeedBack Form/Feedback.html';
});