Some styling and code cleanup

This commit is contained in:
tyler committed 2023-05-26 16:15:20 -07:00
1 parent 39b844b698
commit 5f06c80882
5 files changed
+74 -99

No files matched your search

-19
View File
@@ -1,19 +0,0 @@
<script>
// When the user scrolls the page, execute myFunction
window.onscroll = function() {headerscroll()};
// Get the header
var header = document.getElementById("NavHeader");
// Get the offset position of the navbar
var sticky = header.offsetTop;
// Add the sticky class to the header when you reach its scroll position. Remove "sticky" when you leave the scroll position
function headerscroll() {
if (window.pageYOffset > sticky) {
header.classList.add("sticky");
} else {
header.classList.remove("sticky");
}
}
</script>