Improved JS scrolling on page select