I'd like to hide a div
when another appears on the screen.
The div I want to hide has position: fixed
, that is to say it accompanies the scroll of the page, however, in the footer has a part similar to this div and I would like to hide the div fixed when the other was in sight. I tried the following code but no effect.
CODE
$(window).on('scroll', function() {
if($('#footer').is(":visible")) {
$(".socials").fadeOut("fast");
}else{
$(".socials").fadeIn("fast");
}
});