Callback Functions in jQuery
You can avoid this by writing a callback function.
After the current effect has finished, a callback function is performed.
Syntax is as follows: $ (selector).hide(speed,callback);
The callback parameter in the example below is a function that will be executed after the conceal impact is finished: