fix mobile menu
This commit is contained in:
@@ -28,7 +28,11 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
'enable-status'
|
||||
];
|
||||
|
||||
|
||||
|
||||
const sections = document.querySelectorAll('.section-bg');
|
||||
|
||||
|
||||
const observer = new IntersectionObserver((entries) => {
|
||||
entries.forEach((entry, index) => {
|
||||
if (entry.isIntersecting) {
|
||||
@@ -39,6 +43,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
});
|
||||
}, { threshold: 0.1 });
|
||||
|
||||
sections.forEach(section => {
|
||||
section.style.transform = 'translateY(30px)';
|
||||
section.style.opacity = '0';
|
||||
section.style.transition = 'transform 0.7s ease-out, opacity 0.7s ease-out';
|
||||
observer.observe(section);
|
||||
});
|
||||
|
||||
|
||||
function throttle(fn, wait) {
|
||||
let lastTime = 0;
|
||||
@@ -56,6 +67,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
const mobileNav = document.querySelector('[data-mobile-nav]');
|
||||
const navLinks = mobileNav.querySelectorAll('a');
|
||||
|
||||
|
||||
// Debounce function to prevent rapid clicks
|
||||
function debounce(fn, wait) {
|
||||
let timeout;
|
||||
|
Reference in New Issue
Block a user