http://blog.teamtreehouse.com/learn-asynchronous-image-loading-javascript
Once you set the src
attribute on this image downloading will start, so before that we want to create a handler for the onload
event. Once the image has been downloaded this will trigger.