Skip to content

Commit

Permalink
Update ScrollSpy offset to use rootMargin for better responsiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
derkweijers committed Jan 11, 2025
1 parent aeafa13 commit f6ad1b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ window.addEventListener('DOMContentLoaded', event => {
if (mainNav) {
new bootstrap.ScrollSpy(document.body, {
target: '#mainNav',
offset: 74,
rootMargin: '0px 0px -40%',
});
};

Expand Down

0 comments on commit f6ad1b1

Please sign in to comment.