I've got a function called compute()
that does a bunch of computations and then updates the values of an HTML table, triggered by a click()
event. This is not an ajax call, just several for
loops.
What I'd like to do is provide a visual indicator that the computation is running. Something like modifying the opacity of the table. I thought that something like the following could work :
$("#mytable").css("opacity", "0.5");
compute();
$("#mytable").css("opacity", "1");
But when I use this code the opacity does not seem to be modified.
Any hint on how to do this ?
Many thanks in advance !