title: Refreshing images on a page periodically
body: <p>I'm building a page to display a bunch of webcam images and update them periodically so that the page can be used for at-a-glance monitoring. However, I'm having issues getting the periodic reload working. My code looks something like:</p>
  
  <pre><code>&lt;div class='cameras'&gt; 
      &lt;div class='camera'&gt; 
        &lt;h4&gt;Desk&lt;/h4&gt; 
        &lt;img height='240' src='http://somehost/cameras/cam0/lastsnap.jpg' width='320'&gt; 
      &lt;/div&gt; 
      &lt;div class='camera'&gt; 
        &lt;h4&gt;Main Room&lt;/h4&gt; 
        &lt;img height='240' src='http://somehost/cameras/cam1/lastsnap.jpg' width='320'&gt; 
      &lt;/div&gt; 
      &lt;div class='camera'&gt; 
        &lt;h4&gt;Studio&lt;/h4&gt; 
        &lt;img height='240' src='http://somehost/cameras/cam2/lastsnap.jpg' width='320'&gt; 
      &lt;/div&gt; 
    &lt;/div&gt; 
  </code></pre>
  
  <p>Ideally I'd like to get these things reloading every couple of seconds from their specified URLs without having to generate individual JS for each camera. I've got jQuery in use for a few other bits and pieces, so sticking to that would be great - then again, a plain JS solution is fine too.</p>
  
  <p>Any ideas, StackOverflow JS Gods?</p>