Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I display a gif animation to the user while a picture is loading (in the web)?

The problem: I have set of pictures, when the user presses on one of them, it's grow to an area in the page. The exchange of the pictures is done with the help of js. Tthe picture is weigh about 0.5M, therefore it's take about 3 sec until the picture is showed. I would like to present a type of animation while the picture is not displayed. How can I do this with the help of js?

like image 320
Alon Ashkenazi Avatar asked Mar 01 '10 23:03

Alon Ashkenazi


1 Answers

There's always the "marquee" tag with a "loading" message that you turn off as soon as your image is swapped in. Of course, even I would downvote anyone advocating marquee.

like image 89
No Refunds No Returns Avatar answered Oct 18 '22 21:10

No Refunds No Returns