【发布时间】:2017-04-29 06:18:26
【问题描述】:
我正在努力让我的 Isotope 在图像加载后执行,否则,Isotope 项目会重叠。 - 我正在尝试将 ImagesLoaded 插件 (http://imagesloaded.desandro.com/) 应用到我的 Isotope,但是,在图像加载后我正在努力执行 Isotope。
以下是我的未加载图像的同位素,如果有人知道该怎么做,我将不胜感激! (:这是我的同位素:http://illuminategg.hol.es/portfolio.html
var isotope_port = $('.port-isotope');
isotope_port.isotope({
'itemSelector': '.item'
});
$('.port-filter a').click(function() {
$(this).parent().parent().find('li').removeClass('selected');
$(this).parent().addClass('selected');
var selector = $(this).attr('data-filter');
isotope_port.isotope({ filter: selector });
return false;
});
【问题讨论】:
-
您在控制台中是否遇到任何错误?
-
我已经为图像添加了一个最小高度值,似乎工作得更好,但不确定是否 100% 已修复。
标签: javascript jquery jquery-isotope imagesloaded