javascript - How to trigger a delayed jQuery event? -


i'm writing workaround web form. given problem hitting submit pops out loading animation. content saved, form still shown, loading animation.

the idea trigger event, 2-3 seconds after submit click, reset form content , hide loading animation.

how suggest approach this?

thank you.

use callback functions in events chain them - way make sure action has completed, instead of trying run of them @ same time. if post code can more. there's .delay() function, think callbacks more appropriate, because process event driven , not time driven. have more flexibility in case in process goes wrong, instead of statically resetting after click.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -