Peter
Peter

Reputation: 38585

JQuery loading image

Is there any way to show a loading image while loading a image?

Upvotes: 0

Views: 2670

Answers (1)

Matt
Matt

Reputation: 2902

The easiest way would be to set a background image with css on the img element (or the containing element) - no javascript needed (you will, of course, need to set dimensions on the img tag)

If you want to ensure the image isnt displayed until fully loaded you can use this technique.

Upvotes: 1

Related Questions