Tell me more ×  Some time images take some time to render in the
browser. I want show a busy image while the actual image is
downloading, and when image is downloaded, the busy image is
removed and actual image is be shown there. How can I do this
with JQuery or any javascript?  share|improve this question
Possible duplicate:… –  Yahel Jan 8 '11 at 18:23 add comment  4
Answers  up vote 22 down vote accepted  You can do something
like this:  // show loading image  // main image loaded ?   //
hide/remove the loading image  You assign load event to the
image which fires when image has finished loading. Before that,
you can show your loader image.  share|improve this answer I
have also used this technique and it works really well. Just
remember to handle the error and abort cases... –  will Jan 26
'11 at 4:54 @will how to handle errors? –  Pineapple Under the
Sea Apr 5 '12 at 9:13 @WearetheWorld add handler for the error
event. you can do something like
$(img).load(handler).error(handler). @see –  Tapas Bose Jul