I am using the following code to trigger an animation to begin again (start over) by clicking on a button. Instead, I would like to trigger the same action when the page loads so no button is involved.

Is there a way to convert this code to do that? Many thanks for any help!

<script type="text/javascript">
    $('button').on('click', function(){
        $('img').attr('src', 'animations/washington.gif');