Hi, I have a code on my website.
backgroundImages[bg_img_path_b]=new Image();
backgroundImages[bg_img_path_b].src = bg_img_path_b;
backgroundImages[bg_img_path_b].loaded="loading";
jQuery(backgroundImages[bg_img_path_b]).bind('load.backgroundImages',function(){
if(typeof callback=='function'){
callback.call(this, bg_img_path_b);
if(showLoading) hideLoadingDC();
}
}).bind('load.cache', function(){
backgroundImages[bg_img_path_b].loaded="true";
});;
There is a large image of the fo gallery used as page wrapper background images. I need to preload the images due to speed (the images are quite large). So I have this code (in fact, this is only part of a larger function that includes caching, etc., but these few lines are triggered when the image is not in the cache).
backgroundImages is a large array of Image objects, the key is the path to the image. Each obejct image has my “uploaded” property, which says if the image is already uploaded or is currently in the upload state.
, ( ..)
I.E 9. ( ). , , , , , .
, , , IE, .
, , IE Chrome : (
, , , , ..