title: onload event after dynamic data populates element
body: <p>I have a service that pulls data from my server and populates it into a container on the page. I'm trying to get an onload event to fire after the data has completely loaded (images and all) into the element. Here is an example:</p>
  
  <pre><code>&lt;div id="DynamicContainer"&gt;&lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
      $.ajax({
          url: "www.serverurl.com/service.ashx",
          async: true,
          success: function(data) {
              var e = document.getElementById("DynamicContainer");
              var $e = $(e);
              $e.hide();
              e.innerHTML = ""; // Clear contents
              e.onload = function() { // Set load event
                  $e.show(); // (This isn't firing after the 'e.innerHTML = data' has completed loaded)
              };
              e.innerHTML = data; // The above "onload" event isn't firing after the contents have loaded.
          }
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Any suggestions?</p>