开发者

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:

  1. Image that you are loading with visibility:hidden;

  2. div with loading message.

  3. 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")

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜