9,937
edits
Changes
m
no edit summary
window.onscroll = function() {
var header_height = document.getElementById("p-advertisement").scrollHeight;
if (window.scrollY > header_height){
document.getElementById("p-advertisement").style.position="fixed";
document.getElementById("p-advertisement").style.top="0px";
}
else{
document.getElementById("p-advertisement").style.position="static";
}
}
/*document.getElementById("p-advertisement").style.position="fixed";
document.getElementById("p-advertisement").style.top="0px"*/