The document.ready() event
If you add your code to the end of your document, it is still possible some images will take longer than expected.
It's good to wait for the document to be fully loaded and ready before working with it.
๐ Try it out - Wrap your previous animate code with the document.ready() event
$(document).ready(function(){
$("h1").animate({left: '100%'}, "slow");
});
When an event is fired, the callback function will handle the event.