<p>I would like to flash a success message on my page.</p>

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

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

<p>How can you animate this using jQuery? </p>

use
```
setTimeout(function(){$elem.hide();}, 5000);
```
Where
```
$elem
```
is the element you wish to hide, and
```
5000
```
is the delay in milliseconds. You can actually use any function within the call to
```
setTimeout()
```
, that code just defines a small anonymous function for simplicity.