waitMe
waitMe copied to clipboard
Fade in, fade out, stack
I know that here's not the place to ask for features, but... I would like to have an option to enable fadeIn and fadeOut, and stack the requests, like if I call it two times, only hide after two hide() calls:
$('#container').waitMe();
...something...
$('#container').waitMe();
...something...
$('#container').waitMe('hide');
// do not hide yet, wait until I call it again
...something...
$('#container').waitMe('hide'); //now you can hide the loading animation
What is it for? When you call second time for this object $('#container') it's rerun animation, but not create new copy, after you hide it's removed.
I need to use it on body, to wait multiple api calls, eg, in my app, sometimes I need to call a websocket service several times at once, like in save button, to save two different things, so I would like to have some way to control it, when the first response comes, it would wait the second response to definitely hide the animation.