title: Bootstrap3 carousel - picking random next slide
body: <p>I'm kind of stumped. :) I'm new to Javascript, but have typically found lots of great help on the net when I Googled.  The best help I could come up with this time was here, but the docs said it was better to post a new question than sidetrack the original post.  So, here's my question:  I'm using Bootstrap3's carousel I'm trying to pick a random starting image, and then continue with random images after that. I've figured out how to pick the first slide, but can't figure out how to pick the next slide. As it stands, it just continues to cycle through the show.</p>
  
  <pre><code>&lt;div id="myCarousel" class="carousel slide" data-wrap="true" data-ride="carousel"&gt;
  &lt;!-- Slider Content (Wrapper for slides )--&gt;
      &lt;div class="carousel-inner"&gt;
          &lt;div class="item"&gt;
              &lt;img src="images/slides/AAA.jpg" alt="AAA" /&gt;
          &lt;/div&gt;
          &lt;div class="item"&gt;
              &lt;img src="images/slides/BBB.jpg" alt="BBB" /&gt;
          &lt;/div&gt;
          &lt;div class="item"&gt;
              &lt;img src="images/slides/CCC.jpg" alt="CCC" /&gt;
          &lt;/div&gt;
          &lt;div class="item"&gt;
              &lt;img src="images/slides/DDD.jpg" alt="DDD" /&gt;
          &lt;/div&gt;
          &lt;div class="active item"&gt;
              &lt;img src="images/slides/EEE.jpg" alt="EEE" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;script src="js/bootstrap.js"&gt;&lt;/script&gt;
  &lt;script type='text/javascript'&gt;
       $(document).ready(function() {
  
           /* Pick a random number and apply it to the first slide in the slideshow item */
           $('.item').eq(Math.floor((Math.random() * $('.item').length))).addClass("active");
  
           /* Pick random next slide */
           $('#myCarousel').carousel(Math.floor((Math.random() * $('.item').length))));
  
       });
  &lt;/script&gt;
  </code></pre>
  
  <p>Thanks. :)</p>