change hide to animate opacity to prevent scrolling to top