I have a white menu button that has a fixed position. I have a section on my website that has a white background color. My goals is that when the menu button scrolls over the white section it turns black instead of white.
I just have no idea how I can detect the background color of my fixed element? Is this even possible?
here's what my jQuery looks like:
$color = how to detect bg color?;
if ($color == "#fff"){
$("nav-icon2").css("color", "#000");
}else{
$("nav-icon2").css("color", "#fff");
}