update javascript, stop scrolling