title: Pre load background images in jQuery
body: <p>I'm having trouble pre loading background images. This is my attempt but still seems to not be working - ie. there is still a delay seeing the image when i call showAjaxLoader("#mytarget"). Does anybody have any suggestions?</p>
  
  <p>CSS:</p>
  
  <pre><code>div.entryform-ajax-loader {
      background-image:url(../images/preloader-entry-form.gif);
  }
  </code></pre>
  
  <p>Script:</p>
  
  <pre><code>var ajax_loader = $('&lt;div /&gt;').attr('class', 'entryform-ajax-loader');
  
  function showAjaxLoader(target)
  {
      $(target).append(ajax_loader);
  }
  
  function hideAjaxLoader(target)
  {
      ajax_loader.remove();
  </code></pre>