I'm having some issues preloading images with jquery in IE.

I tried just creating the image in memory with the appropriate source like
this:
$(' ').attr('src',iBuildThePathHere);

But only Firefox will preload the image that way. The only way I've been
able to successfully achieve the preloading in IE is to create the image
element like above, then insert it in my document and then hide it instantly
like this:
$(' ').attr('src',iBuildThePathHere).insertAfter($('#someElement')).hide();

All the tutorials on preloading images I've read seem to indicate that you
can simply create an image element (with jquery or with basic js like new
Image() or document.createElement('img')) in memory and never actually
append it to the document.  Anybody else ever run into this?
-- 
View this message in context: 
http://www.nabble.com/preloading-images-with-jquery-in-IE-tp14330317s27240p14330317.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to