Created
April 11, 2012 03:11
-
-
Save jacoborus/2356615 to your computer and use it in GitHub Desktop.
Cargar imagen con jQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var img = $('<img/>').load(function() { | |
// Loading done .. | |
img.appendTo("#imagePopup .content"); | |
}).error(function(){ | |
// Unable to load image .. | |
$("#imagePopup .content").html('Image failed to load.'); | |
}).attr('src', imageSource); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment