zIndex bug cleared
document.width changed to window.innerWidth