// FIXED YOUR NAV ON TOP IF SCROLL
// i listen scroll, and i get if my scroll position Y is superior to 45 px,
//if is superior i fixed my div on top=0, else i can define my div position to relative or none
window.addEventListener('scroll', function() {
// if scroll down after 45px (position Y)
if(window.scrollY>45){
document.querySelector('nav').style.position='fixed'
document.querySelector('nav').style.top='0'
}else{
document.querySelector('nav').style.position='relative'
}
});
// OverflowX and OverflowY properties in Javascript
// x-axis scroll bar
document.getElementById("myId").style.overflowX = "scroll";
// y-axis scroll bar
document.getElementById("myId").style.overflowY = "scroll";
// both x-axis and y-axis scroll bar
document.getElementById("myId").style.overflow = "scroll";
// To remove overflow, do the following:
document.getElementById("myId").style.overflow = "hidden";
window.scroll(x-coord, y-coord)
window.scroll(options)