title: jQuery Infinite (Loop)
body: <p>I've found plenty of documentation on infinite loops, but with multiple approaches and nothing that really EXPLAINS it, making it difficult to implement to my code.</p>
  
  <p>I'm looking to use it in two ways: </p>
  
  <ol>
  <li>horizontal scrolling (click arrow and animate)</li>
  </ol>
  
  <p><a href="http://jsfiddle.net/stfzy/33/" rel="nofollow">http://jsfiddle.net/stfzy/33/</a> (currently I've got it to stop when it reaches end)</p>
  
  <ol>
  <li>automatic loop of just one div, similar to this:</li>
  </ol>
  
  <p><a href="http://jsfiddle.net/UHpbR/2/" rel="nofollow">http://jsfiddle.net/UHpbR/2/</a></p>
  
  <pre><code>(function($) {
      $.fn.seqfx = function() {
          var elements = this,
              l = elements.length,
              i = 0;
  
          function execute() {
              var current = $(elements[i]);
              i = (i + 1) % l;
  
              current
                  .fadeIn(400)
                  .delay(4000)
                  .fadeOut(300, execute);
          }
          execute();
          return this;
      };
  }(jQuery));
  
  $("#fader div").seqfx();
  </code></pre>
  
  <p>Regardless of what the best solution is (i.e. is the stuff above any good or is there a simpler way?), if someone can explain the pieces or direct me to documentation that does, it'd be really great. I'd like to understand WHY the code is getting it to loop, not just copy/paste. </p>
  
  <p>Thank!</p>