title: jQuery insert element and overwrite
body: <p>To empty a div and replace it with an image I am using:</p>
  
  <pre><code>$(this).html('');
  $('&lt;img/&gt;', {
     src: 'blah.gif'
  }).appendTo(this);
  </code></pre>
  
  <p>Is there a better way to do this?</p>
  
  <p>*edit: I have to keep the <code>$('&lt;img/&gt;'</code> part in otherwise I could just do <code>$(this).html('&lt;img src="blah.gif"&gt;');</code> I know!!</p>