Hello,

Suppose I load an image in the browser cache using the JS Image
constructor, how safe is it to manipulate directly the resulting
object (which basically isn't in the DOM) with JQuery?

For instance:

var img = new Image();
img = "sunset.jpg";
$("#place1").append(img);
$(img).clone().appendTo("#place2");

I've tested it in FF/IE7 for Windows, it seems OK but I want to be
sure.
Should I rather manipulate an HTML fragment referring to this image
(<img src="..." />) once I know it has been cached?

Thanks,

Nick

Reply via email to