Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-tk committed Mar 2, 2024
1 parent be9900b commit 8f3e0d5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Smooth scrolling
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
Expand All @@ -9,7 +8,6 @@ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
});
});

// Highlight active navigation link
window.addEventListener('scroll', function() {
let currentSection = '';

Expand All @@ -27,4 +25,4 @@ window.addEventListener('scroll', function() {
link.classList.add('active');
}
});
});
});

0 comments on commit 8f3e0d5

Please sign in to comment.