Isotope jquery plugin doesn't show properly on chrome

后端 未结 1 1736
情话喂你
情话喂你 2020-12-31 18:34

I implanted Isotope jquery plugin successfully but for some reason I get problem showing all the items when the page is loaded first time and it\'s only on Chrome.

Y

1条回答
  •  一整个雨季
    2020-12-31 19:00

    The problem is probably that Isotope is doing its thing before the images are loaded.

    http://isotope.metafizzy.co/demos/images.html

    [In this demo] Isotope is triggered after all images are loaded with the imagesLoaded plugin.

    http://isotope.metafizzy.co/docs/help.html#imagesloaded_plugin

    var $container = $('#container');
    
    $container.imagesLoaded(function() {
      $container.isotope({
        // options...
      });
    });
    

    0 讨论(0)
提交回复
热议问题