I currently have a fixed menu on my website, and I would like the header menu to change color to white when scrolling down. I have implemented this jQuery script:
jQuery(document).scroll(function(){
if(jQuery(this).scrollTop() > 300)
{
jQuery('#navigation').css({"background":"white"});
} else {
jQuery('#navigation').css({"background":"transparent"});
}
});
I have added this code to my site that I am working on. However, the white background is causing all text to be overridden, only displaying text when it is close to the background. How can I make the logo appear in inverted colors while keeping the text black on a white background? I came across this CSS code:
-webkit-filter: invert(.8);
filter: invert(.8);
I'm unsure how to include this in the jQuery script.