How can I add loading text/image to images that are still loading with jQuery?
I need to apply this to images t开发者_运维百科hat are selected by jQuery selector for example $("img"), should apply this to all images in page.
jquery loading image while elements loads https://stackoverflow.com/.../adding-a-loading-image-to-dynamic-images-comming-from-flickr
I guess you can do like this.
create an initial layout with the following:
Image that you are loading with visibility:hidden;
div with loading message.
jQuery's domready show the image and hide the div.
Is this okay?
There is a tutorial at
http://jqueryfordesigners.com/image-loading/
that you would want to supplement with an each() loop in $("img")
精彩评论