title: preload image then change background javascript
body: <p>Im changing the background image with the following code inside a script tag. This is causing a whiteflash when the background changes, all my pages are ajax. I cant just pick a background color like the background as im also using this on profiles page and each profile has a different background.</p>
  
  <p>is it possible to preload the image then change the background to stop the whiteflash? thanks</p>
  
  <pre><code>  $('body').css('background-image', 'url(../images/waves.jpg)');
    $('body').css('background-attachment', 'fixed');
    $('body').css('background-size', 'cover');
  </code></pre>