1

Possible Duplicate:
How to show a spinner while loading an image via JavaScript

I'm displaying a list of Articles, where each article has an image. It looks something like this

mockup

The issue is that the view renders before the images are downloaded and it displays an empty box before the image is loaded.

Is there a good way that I could display some kind of a placeholder while the image is being loaded, and then just swap it once the image loads?

4

0 回答 0