use innerWidth
remove wrong param
remove window.resize event