make sure page is ready before scrolling to anchor