title: ajax auto refresh stats
body: <p>I have a script that refreshes a counter in a div every 5 seconds. However on load it doesn't show up until after that 5 seconds, and then continually refreshes at the same interval. How do I make it show for the initial 5 seconds?</p>
  
  <pre><code>&lt;script&gt; 
  var auto_refresh = setInterval(
  function()
  {
  $('#refresh-me').load('stats_counter.php?table=testimonials');
  }, 5000);
  &lt;/script&gt;
  
  &lt;!---- stats ----&gt;
  &lt;div id="refresh-me"&gt;
  
  &lt;/div&gt;
  &lt;!---- stats ----&gt;
  </code></pre>