What I'd like to know is if there is a nice way to queue jQuery functions to execute after a set amount of time. This wouldn't pause the execution of other functions, just the ones following in the chain. Perhaps an example of what I'd envisage it would look like would illustrate:
$('#alert')
.show()
.wait(5000) // <-- this bit
.hide()
;
I know that it's possible by using timeouts, but it seems like that's a messy way to do it, especially compared to the above example (if it were real).
So, is something like this already built-in to jQuery, and if not, what is the best way to emulate it?