I have written some javascript whereas if you click on some divs those expand with some data. it takes a few seconds to populate the divs. So to avoid users getting frustrated I have done the following:
- if user clicks on div then add animated gif (moving bar,...) on div
- when data is ready event is triggered and animated gif is removed
can somebody suggest a better approach or pattern ? since I don't know how expensive for the browser to render animated gifs...
thanks