1

I am trying to improve the loading event on my photo blog, but I am a bit disapointed.

All my images are dynamicly add to a background: url() of .cover-gallery div. I use waitForImages plugin but when the page loaded I have the usual glitch of image process loading.

I would only fade in my .cover-gallery div when they are fully loaded.

// Hide images by default
$('.cover-gallery').find('div').addClass('fadeOut');

// Detect when images are fully loaded
$('.cover-gallery').find('div').waitForImages({
  finished: function() {
    $('.loader').addClass('fadeOut');
    $('.cover-gallery').find('div').removeClass('fadeOut').addClass('fadeIn');
  },
  waitForAll: true
});

You can see it in live at blog.jeremybarbet.com.

jeremybarbet
  • 890
  • 1
  • 15
  • 28

0 Answers0