I have a class which after scrolling a bit the navbar has the class after scrolling a bit. This works only on the links but not the logo. The logo isn't even affected by adding other elements in the css. I've tried using ! important and more. I'm not sure if I should add a secondary class onto the h2 and then try using the sch class again.
I get no errors in the console either
const navbar = document.querySelector('nav');
window.onscroll = () => {
if (window.scrollY > 610) {
navbar.classList.add('sch');
} else {
navbar.classList.remove('sch');
}
};