-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
33 lines (25 loc) · 1.11 KB
/
index.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
const scrollingDiv = document.getElementById('scrollingDiv');
let lastScrollPosition = window.scrollY;
window.addEventListener('scroll', () => {
const currentScrollPosition = window.scrollY;
if (currentScrollPosition > lastScrollPosition) {
// Scrolling down
scrollingDiv.style.transform = 'translateY(-100%)';
} else {
// Scrolling up
scrollingDiv.style.transform = 'translateY(0px)';
}
lastScrollPosition = currentScrollPosition;
});
// Optional: Add smooth scrolling to the top when clicking the div
scrollingDiv.addEventListener('click', () => {
window.scrollTo({ top: 0, behavior: 'smooth' });
});
//-------------------------------LOOP VIDEO---------------------------------------------------\
if (selectedLanguage === "en") {
window.location.href = "main-page-en.html"; // İngilizce sürümüne yönlendir
} else if (selectedLanguage === "ru") {
window.location.href = "main-page-ru.html"; // Rusça sürümüne yönlendir
} else if (selectedLanguage === "az") {
window.location.href = "main-page.html"; // Azerice sürümüne yönlendir (ana sayfa)
}