I would like to use blinking text to signify that data is loading. Then hide it once the data is loaded.
I'm also using Flask.
I'm a JQuery newbie and found a recipe for flashing text, but it has the side effect, that hide didn't work.
setInterval(function() {
$( "#blink" ).fadeToggle();
}, 500);
The I tried to hide after loading data into a div.
$("#data").load("/load_data/", function() {
$("#blink").hide('fast')
});
HTML:
<p id="blink">Loading Data</p>
<div id="data"></div>
Does this not work or am I just screwing it up...? Is there another simple solution ?
TIA !! Happy NY's
UPDATE:
Debugging Andrew Brooke's answer customized for a callback on load.
$("#data").load("/load_data/", function() {
$.clearInterval(blink);
$("#blink).hide("fast")
});