Isotope not working with imagesLoaded?

后端 未结 2 630
礼貌的吻别
礼貌的吻别 2021-01-18 07:52

I\'m using jQuery Isotope to create a horizontal layout, aligning DIVs with 100% height next to each other and center images inside each DIV vertically. So for, I\'m calling

2条回答
  •  Happy的楠姐
    2021-01-18 08:40

    I also came over to the same problem recently and discovered that this is due to async calls. Your $container.imagesLoaded() function is called before the images loaded plugin is loaded.

    You just need to wrap $container.imagesLoaded() into $(document).ready() and remove asyn attr from jquery script line.

提交回复
热议问题