Skip to content

Instantly share code, notes, and snippets.

@james2doyle
Created July 30, 2012 18:47
Show Gist options
  • Save james2doyle/3209111 to your computer and use it in GitHub Desktop.
Save james2doyle/3209111 to your computer and use it in GitHub Desktop.
Create Image. Onload function.
var img = new Image();
img.src = 'url-to-my-image.jpg';
img.onload = function() {
document.body.appendChild( img );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment