title: Need help looping some quotes
body: <p>I'm trying to loop some quotes so they continue to display over and over but I'm having trouble, I have looked at some other posts on google and on here but can't work out how to change the codes on the posts to work with my code provides below. I have used a website called edit fiddle - JSFiddle to test the code and at the moment it just stops at the last quote. any help would be appreciated thank you. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var slideIndex = 0;
  showSlides();
  
  function showSlides() {
    var i;
    var slides = document.getElementsByClassName("mySlides");
    var dots = document.getElementsByClassName("dot");
    for (i = 0; i &lt; slides.length; i++) {
      slides[i].style.display = "none";
    }
    slideIndex++;
    if (slideIndex &gt; slides.length) {
      slideIndex = 1
    }
    for (i = 0; i &lt; dots.length; i++) {
      dots[i].className = dots[i].className.replace(" active", "");
    }
    slides[slideIndex - 1].style.display = "block";
    dots[slideIndex - 1].className += " active";
    setTimeout(showSlides, 8000); // Change image every 10 seconds
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>* {
    box-sizing: border-box
  }
  
  body {
    font-family: Verdana, sans-serif;
    margin: 0
  }
  
  
  /* Slideshow container */
  
  .slideshow-container {
    position: relative;
  }
  
  
  /* Slides */
  
  .mySlides {
    display: none;
    padding: 80px;
    text-align: center;
  }
  
  
  /* Add an italic font style to all quotes */
  
  q {
    font-style: italic;
  }
  
  
  /* Add a blue color to the author */
  
  .author {
    color: cornflowerblue;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
    &lt;div class="slideshow-container"&gt;
  
      &lt;div class="mySlides"&gt;
        &lt;q&gt;I HATE EVERY MINUTE OF TRAINING. BUT I SAID, DON’T QUIT. SUFFER NOW 
      AND LIVE THE REST OF YOUR LIFE AS A CHAMPION.&lt;/q&gt;
        &lt;p class="author"&gt;- MOHAMMAD ALI&lt;/p&gt;
      &lt;/div&gt;
  
      &lt;div class="mySlides"&gt;
        &lt;q&gt;YOU’RE THE ONLY ONE WHO CAN MAKE THE DIFFERENCE. WHATEVER YOUR DREAM 
      IS, GO FOR IT. &lt;/q&gt;
        &lt;p class="author"&gt;– MAGIC JOHNSON.&lt;/p&gt;
      &lt;/div&gt;
  
      &lt;div class="mySlides"&gt;
        &lt;q&gt;IF YOU TURN UP WORRYING ABOUT HOW YOU’RE GOING TO PERFORM, YOU’VE 
      ALREADY LOST. TRAIN HARD, TURN UP, RUN YOUR BEST AND THE REST WILL TAKE 
      CARE OF ITSELF. &lt;/q&gt;
        &lt;p class="author"&gt;– USAIN BOLT.&lt;/p&gt;
      &lt;/div&gt;
  
      &lt;div class="mySlides"&gt;
        &lt;q&gt;I have not failed. I've just found 10,000 ways that won't work.&lt;/q&gt;
        &lt;p class="author"&gt;- Thomas A. Edison&lt;/p&gt;
      &lt;/div&gt;
  
      &lt;div style="text-align:center"&gt;
        &lt;span class="dot"&gt;&lt;/span&gt;
        &lt;span class="dot"&gt;&lt;/span&gt;
        &lt;span class="dot"&gt;&lt;/span&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>