I'm trying to achieve this with jQuery + JavaScript:

I have commands/functions that need to be called in a sequence, with a small delay in between them. Examples of those include changing the css property of an element, showing hiding another etc.

JavaScript does not have a sleep function as far as I know. So I'm wondering if jQuery has a plugin or something that supports this feature?

Essentially, a function like `$(window).schedule(function() { /* do something here*/ }, 500);` would be nice. This will push the function into the queue and will be executed as soon as all the previous functions in the queue are executed, if there are no functions in the queue, it will be executed immediately. The integer parameter specifies the delay between this function and the one previous to it.

I think I know how to build this from the ground up, but I'm hoping there is a plugin for this because it will save me from reinventing the wheel.

If there isn't.. I'll build this and release it. :)