title: jQuery Ajax wait until all images are loaded
body: <p>I'm trying to perform an Ajax call with jQuery which is working well. I use the success event to display the data. It seems however that success gets triggered as soon as the external HTML file gets loaded. If there are large images they keep loading after they're shown. Is there a way to display the content after everything is fully loaded? Here is the code:</p>
  
  <pre><code>$('#divajax').html('&lt;br&gt;&lt;div style="text-align: center;"&gt;&lt;img src="res/ajax-loader.gif"&gt;&lt;/div&gt;');
  $.ajax({
      cache: false,
      url: 'ajax/content.php',
      success: function(data) {
            $('#divajax').html(data);
      }
  });
  </code></pre>