title: Showing a loading animation for an iframe in a jQuery UI modal dialog
body: <p>UI experts,
   I'm trying to get a slow website loaded in an iframe within a jquery modal dialog, but I'm having trouble. This is my use case:</p>
  
  <ol>
  <li>open a jquery dialog, with a single "loading..." gif</li>
  <li>load a different URL in the background </li>
  <li>once loaded, replace the gif with the URL</li>
  </ol>
  
  <p>I'm able to open the URL directly with code as below:</p>
  
  <pre><code>    var popup = $('&lt;div id="popup123" class="dialog"&gt;&lt;/div&gt;').prependTo('body');
      popup.prepend('&lt;iframe style="display:none" class="dialogIFrame"&gt;&lt;/iframe&gt;');
      $('.dialogIFrame').attr("src", 'http://myslowsite');
      $('.dialogIFrame').show();
      popup.dialog({
          modal: true,
          title: 'Site',
          width: 1000,
          height: 500,
      });
  </code></pre>
  
  <p>So my question is - how do I add a "loading..." gif to the mix? Should be possible - but I can't seem to figure out!</p>
  
  <p>Thanks in advance!</p>