newbie
newbie

Reputation: 24625

How can I add loading text/image to images that are still loading with jQuery?

I need to apply this to images that are selected by jQuery selector for example $("img"), should apply this to all images in page.

Upvotes: 1

Views: 566

Answers (3)

Justin Wignall
Justin Wignall

Reputation: 3510

There is a tutorial at

http://jqueryfordesigners.com/image-loading/

that you would want to supplement with an each() loop in $("img")

Upvotes: 0

Tommy
Tommy

Reputation: 1985

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?

Upvotes: 0

Related Questions