Update 1.js

This commit is contained in:
FURK4NGG
2025-02-20 18:09:14 +03:00
committed by GitHub
parent 82ed824515
commit 828deff8eb
+25
View File
@@ -1,3 +1,28 @@
/*SERVICES VISIBILITY*/
const boxes = document.querySelectorAll('.services_id');
// Görünürlük kontrol fonksiyonu
function checkVisibility() {
const triggerBottom = window.innerHeight * 0.8;
boxes.forEach((box) => {
const boxTop = box.getBoundingClientRect().top;
if (boxTop < triggerBottom) {
box.classList.add('visible');
box.classList.remove('hidden');
} else {
// Aksi halde kutuyu gizle
box.classList.remove('visible');
box.classList.add('hidden');
}
});
}
window.addEventListener('scroll', checkVisibility);
window.addEventListener('load', checkVisibility);
/*IMAGE CHANGER*/ /*IMAGE CHANGER*/
let currentIndex = 0; let currentIndex = 0;
const images = document.querySelectorAll('#photo img'); const images = document.querySelectorAll('#photo img');