Hello,
I'm trying to implement this idea in my project:
function removerSetas() {
var topo = $(window).scrollTop(),
alvo = $("#alvo").offset().top,
setas = $(".left, .right");
if ( topo > alvo ) {
setas.addClass("hide");
} else {
setas.removeClass("hide");
}
}
$(function() {
$(window).scroll(removerSetas);
removerSetas();
});
When arriving at a div with id="alvo"
is added to classe="hide"
in the arrows, seeing in the console actually adds correctly when it arrives at id="alvo"
In the structure of my project is not working properly, this is my code:
The hide class is being added by js before reaching the id = target. The divs without content left thus to be possible to see only the structure
Thank you for your help