Animation on Load on secondary side

How can I ensure that an animation of an element, which is supposed to start on a secondary page upon load, only begins when the user actually navigates to that page?