I'm attempting to update the menu text color when the header shrinks on scroll.
I've experimented with this code:
$(window).scroll(function() {
if ($(document).scrollTop() > 20) {
$('ul.art-hmenu>li>a').addClass('shrinkmenufont');
} else {
$('ul.art-hmenu>li>a').removeClass('shrinkmenufont');
}
});
using:
.shrinkmenufont {
font-color: black;
}
The function runs, but the font color stays white and doesn't switch to black as intended when scrolling down.
Any advice would be greatly appreciated.
Thank you!
Link:
Website