title: How to I preload images where it actually forces the images to load before continuing (html/javascript)?
body: <p>I want to preload images but ensure they are loaded before continuing. How can I do this?</p>
  
  <p>The following does not work as it sends off the load request only, but doesn't wait till the image is loaded. So it is possible that the image isn't loaded when requested soon after.</p>
  
  <pre><code>jQuery.preloadImages = function () {
          for (var i = 0; i &lt; arguments.length; i++) {
              jQuery("&lt;img&gt;").attr("src", arguments[i]);
          }
      }       
      $.preloadImages("img1.jpg","img2.jpg");
  </code></pre>