Find hidden elements and store them in an array
<p>I have some mark-up like so:</p>

<pre><code>&lt;div class="slideshow"&gt;
    &lt;div class="slide" style="display:block;"&gt;&lt;/div&gt;
    &lt;div class="slide" style="display:none;"&gt;&lt;/div&gt;
    &lt;div class="slide" style="display:none;"&gt;&lt;/div&gt;
    &lt;div class="slide" style="display:none;"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>Which is basically some divs with one shown and the others hidden.</p>

<p>I'm trying to find the ones that are currently not shown and then randomly select one of them...</p>

<pre><code>var length = $('div.slideshow').find('div.slide:hidden').length;

var ran = Math.floor(Math.random()*length) + 1;
var newSlide = $("div.slideshow &gt; div.slide:nth-child(" + ran + ")");
</code></pre>

<p>However because their is more than one hidden div it will not work... I'm guessing I need to setup an array? Can anyone help me out here as I'm a little confused.</p>
