smoother navbar black background when scrolled
This commit is contained in:
@@ -295,7 +295,7 @@ window.requestAnimFrame = (function () {
|
||||
const navbar = document.querySelector('.navbar');
|
||||
if (navbar) {
|
||||
window.addEventListener('scroll', () => {
|
||||
if (window.scrollY > 50) {
|
||||
if (window.scrollY > 10) {
|
||||
navbar.classList.add('scrolled');
|
||||
} else {
|
||||
navbar.classList.remove('scrolled');
|
||||
|
||||
Reference in New Issue
Block a user