<p>Using jQuery, how would you <code>show()</code> every <code>div.foo</code> on a page in a random order, with a new one appearing every X milliseconds?</p>

<p><strong>Clarification</strong>: I want to start with all these elements hidden and end with all of them showing, so it wouldn't make sense to <code>show()</code> the same element twice.</p>

<p>I originally thought I'd make an array listing all the elements, randomly pick one, show that one, remove it from the array using <code>splice()</code>, and then randomly pick the next one from the remaining list - etc. But since my array is part of a jQuery object, <code>splice()</code> is not available.</p>

I don't use jQuery myself, but what about this:
```
```
var intervalMilliseconds = X; // set to your value for X
var divFoos = $("div.foo").get();
var intervalId = setInterval(function() {
   $(divFoos.splice(Math.floor(Math.random() * divFoos.length), 1)).show();
   if(divFoos.length == 0) clearInterval(intervalId);
}, intervalMilliseconds);
```
```
That should do the trick.
UPDATE: Since your description isn't explicit about it, I assumed you meant that you ultimately want to show all of them, and that once they are visible, we are done. If not, please explain further so I can update this (if you can't already determine what you need from the code I provided).