title: Cycle between multiple images
body: <p>I have this problem: I would like to change the <code>src</code> attribute of an <code>img</code> element in a continuous loop.</p>
  
  <p>Here is my HTML and jQuery code: </p>
  
  <pre><code>&lt;img id="changeSlider" src="{{asset('uploads/photos/')}}{{photo.path}}" alt=""&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      var i = 1;
      while(i &lt; 10) {
          $("#changeSlider").attr('src', '{{asset("uploads/photos/")}}{{photos[0].path}}').delay(3000);
          i++;
      }
  });
  &lt;/script&gt;
  </code></pre>