title: jQuery: setInterval
body: <p>I want to make a slideshow on my site, but the problem is that the setInterval works only one time. It loads my file only one time end then stops. </p>
  
  <p>Heres the code:
  main.html</p>
  
  <pre><code>&lt;img src="images/ex/full.jpg" width="800" height="377" alt=""&gt;
  &lt;script&gt;
      $(document).ready(function(){
          var refreshId = setInterval(function(){
              $('#center').load('images/gallery/best/rotate.php');
          }, 5000);
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>rotate.php</p>
  
  <pre><code>&lt;img src="images/gallery/best/random.php?".&lt;?php echo rand(0,1000) ?&gt;."" width="800" height="377" alt=""&gt;
  </code></pre>
  
  <p>random.php contains a code which loads random image from selected folder, it works good.</p>
  
  <p>Forgot to mention, I got lightbox scripts included too. Maybe they don't work together?</p>
  
  <p>Head:</p>
  
  <pre><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;script type="text/javascript" src="vendors/jquery/jquery-1.4.4.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="vendors/js/prototype.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="vendors/js/scriptaculous.js?load=effects,builder"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="vendors/js/lightbox.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="styles/style.css" type="text/css" /&gt;
  &lt;link rel="stylesheet" href="styles/lightbox.css" type="text/css" /&gt;
  </code></pre>
  
  <p>Thanks.</p>