title: Reload a div via AJAX immediately and then every 5 seconds
body: <p>I want to reload a <code>div</code> every 5 seconds. For this I found a script online which works. The only issue is that the first load of the file is after 5 seconds, but I want to first one to be immediately. It's probably a minor thing but I have never worked with Javascript before. Thank you!</p>
  
  <pre><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      function autoRefresh_div() {
          $("#div").load("load.html");
      }
      setInterval('autoRefresh_div()', 5000);
  &lt;/script&gt;
  </code></pre>