-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript.js
38 lines (27 loc) · 901 Bytes
/
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
window.onload = function () {
setTimeout(() => {
document.querySelector('.popup-message').classList.add('show');
}, 500);
};
window.addEventListener('scroll', () => {
const popup = document.querySelector('.popup-message');
const popupPosition = popup.getBoundingClientRect().top;
const screenPosition = window.innerHeight / 1.5;
if (popupPosition < screenPosition) {
popup.classList.add('visible');
} else {
popup.classList.remove('visible');
}
});
document.querySelector('.popup-message').addEventListener('click', () => {
document.querySelector('.popup-message').classList.toggle('hide');
});
function redirectToNewPage() {
window.location.href = "signup.html";
}
function redirectToNewPage1() {
window.location.href = "login.html";
}
function redirectToNewPage2() {
window.location.href = "manage_users.php";
}