How to manipulate the dom when scrolling
function scrolly() { var sc = document.getElementById('space-shuttle'); var ypos = window.pageYOffset; if (ypos > 587) { sc.style.width = "500px"; } } window.addEventListener("scroll",scrolly);
function scrolly() { var sc = document.getElementById('space-shuttle'); var ypos = window.pageYOffset; if (ypos > 587) { sc.style.width = "500px"; } } window.addEventListener("scroll",scrolly);