title: How to repeat a function call in jQuery
body: <p>I have this code:</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.4.3.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      $(document).ready(function() { 
          function loop(){
              $('#picOne').fadeIn(0).fadeOut(8000);
              $('#picTwo').delay(2000).fadeIn(6000).fadeOut(5000);
              $('#picTree').delay(10000).fadeIn(2000).fadeOut(16000);
              $('#picFour').delay(12000).fadeIn(16000).fadeOut(5000);
          }
          loop();
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>But when the last pic fades out, the code doesn't repeat. What is the problem?</p>