Isotope display gallery after images loaded

前端 未结 1 1268
灰色年华
灰色年华 2021-01-13 12:39

I tried to search and see if there was anything listed under this but I didn\'t see anything. I have a gallery thats laid out using Isotope and it works fine, but while the

相关标签:
1条回答
  • 2021-01-13 13:38

    The plugin's author explains it on GitHub. It's pretty simple actually. Just add the fadeIn right before starting the isotope gallery.

    var $container = $('#container');
    
    $container.imagesLoaded( function(){
      $container.fadeIn(1000).isotope({
        layoutMode : 'fitRows',
        itemSelector : '.photo'
      });
    });
    
    0 讨论(0)
提交回复
热议问题