Look at this script please
var src="some.jpg"; var img = new Image(); img.src = src; img.id = "crop_image"; $("#crop_image").load(function() { $("#crop_cont").append(img); }) why in my .load function i can't access to img element?
Thanks much
UPDATE:
But the following works
$('<img src="'+src+'" />').load(function() { var img = new Image(); img.src = src; $("#crop_cont").append(img); })