removed unnecessary comments
This commit is contained in:
parent
8547915658
commit
2e5d43d34f
1 changed files with 9 additions and 9 deletions
|
@ -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>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue