0
Look at my personal code, my scroll is on the tag body, but it doesn’t work, I’ve done everything and nothing my scroll ta na < body > and still doesn’t work, what’s wrong ?
$(document.body).on("scroll", function(){
if($(document.body).scrollTop() > 10){
$("#navbar").removeClass("fixed-bottom");
$("#navbar").addClass("sticky-top");
}else{
$("#navbar").removeClass("sticky-top");
$("#navbar").addClass("fixed-bottom");
}});
Change
document.body
forwindow
.– Sam
Opa Sam, all good ? Then I changed Document.body for Document.window and even then it didn’t work, I changed Document also just for window and nothing. Check out the page I’m moving: http://nexo.atspace.cc/Final . Nothing I do works :(
– Cyborgue