title: Auto refresh specific div and load image with jquery/ajax
body: <p>I have an internet radio station and I need a script that will display a picture of the current song in a particular dvi with an id. The image is automatically uploaded via ftp to the server each time the song changes..</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="auto"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>JS: </p>
  
  <pre><code>  $ (document).ready(function() {
      $('#auto').html('&lt;img src="artwork.png"&gt;&lt;/img&gt;');
      refresh();
    });
  
    function refresh() {
      setTimeout (function() {
        $('#auto').html('&lt;img src="artwork.png"&gt;&lt;/img&gt;');
        refresh();
      }, 1000);
    }
  </code></pre>
  
  <p>I tried this, but all I get is that the image is loaded, but in case of a change, I have to manually refresh the whole page again..</p>