removed unnecessary comments

This commit is contained in:
Jonas Werner 2025-03-22 12:44:40 +01:00
parent 8547915658
commit 2e5d43d34f

View file

@ -27,13 +27,13 @@
hamburgerMenu.classList.toggle('open');
if (hamburgerMenu.classList.contains('open')) {
navLinks.style.display = 'block'; // Show the nav-links
navLinks.classList.add('slide-in'); // Trigger the slide-in animation
navLinks.style.display = 'block';
navLinks.classList.add('slide-in');
} else {
navLinks.style.display = 'none'; // Hide the nav-links
navLinks.classList.remove('slide-in'); // Reset the animation
navLinks.style.top = '100px'; // Move the nav-links down
navLinks.style.transition = 'top 0.3s ease-in-out'; // Add a transition effect
navLinks.style.display = 'none';
navLinks.classList.remove('slide-in');
navLinks.style.top = '100px';
navLinks.style.transition = 'top 0.3s ease-in-out';
}
});
@ -47,13 +47,13 @@
if (prevScrollPos > currentScrollPos) {
document.getElementById("header").style.top = "0";
navLinks.style.top = '5px'; // Move the nav-links up
navLinks.style.top = '5px';
} else {
document.getElementById("header").style.top = "-100px";
navLinks.style.top = '100px'; // Move the nav-links up
navLinks.style.top = '100px';
}
prevScrollPos = currentScrollPos; // Update the previous scroll position
prevScrollPos = currentScrollPos;
};
</script>