title: How to load image with jquery?
body: <p>Im doing this to load image and show image inside a dialog box. </p>
  
  <pre><code>&lt;div id="image_preview" title="Client Photo Preview"&gt;
     &lt;p&gt;&lt;img src="" alt="client image" id="client_image_preview" /&gt;&lt;/p&gt;
  &lt;/div&gt;
  
  $("#client_image_preview").attr("src", imagelocation);
  
  $('#image_preview').dialog({
      height: 'auto',
      width: 'auto',
      modal: true,
      dialogClass: 'titleless',
      buttons: { "CLOSE": function() { $(this).dialog("destroy"); } }
  });
  </code></pre>
  
  <p>is there way to show a loading gif while image loads with jquery?</p>
  
  <p>Regards</p>