Scenario
I have a page that contains a div
where content is loaded by JQuery and a div
hidden ( hidden
), with a GIF:
<div id="lista"></div>
<div id="loading" hidden>
<img src="loading.gif"/>
</div>
On this page, I have a Refresh button, which calls a JQuery method, and performs the steps:
div
from the list and displays the div
with the gif. Simply display the GIF while waiting for the processing and return of the (extremely common) list.
The "problem"
GIF it has "start / middle / end" . Let's suppose that it displays "1 2 3 4 5 6 7 8 9 10" within 10 seconds.
Sometimes I hit the "Refresh" button and it does not start at the beginning, but rather where it is at the moment (since it is there, but the div
is only hidden).
Question
I would like to know if there is a way to "see the GIF" at the beginning, that is whenever it is displayed, it will start again .
>I do not know if this would have to reload it again, or how to do it.