jQuery.loadImg - $.Deferred powered imgloader
jQuery.loadImg is a imgLoader.
$.loadImg loads img then cache the element into the memory.
Once the imgloading ends, $.loadImg returns the cloned element of the cached img.
This may let you handle img loading easily.
works on jQuery 1.6.2.
$.loadImg('somewhere/img.png').then(function($img){
$('body').append($img);
},function(error){
alert(error.msg);
});
Check the following article to know what happens inside.
-
fingaholicがhamalogからリブログしました
-
petawebがこの投稿を「スキ!」と言っています
-
hamalogの投稿です
blog comments powered by Disqus