How do you pause before fading an element out using jQuery?

Posted by Bjørn on Stack Overflow See other posts from Stack Overflow or by Bjørn
Published on 2008-09-03T18:19:32Z Indexed on 2010/03/31 18:33 UTC
Read the original article Hit count: 192

Filed under:
|
|

I would like to flash a success message on my page.

I am using the jQuery fadeOut method to fade and then remove the element. I can increase the duration to make it last longer, however this looks strange.

What I would like to happen is have the element be displayed for five seconds, then fade quickly, and finally be removed.

How can you animate this using jQuery?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery