问题描述
我成功植入Isotope jquery插件,但由于某种原因,当页面第一次加载时,显示所有项目的问题只显示在Chrome上。
请参阅此处的内容 ,元素在彼此的顶部。但是当我按下PSD,然后回到所有它显示正确。
我没有默认高度的容器,因为我想要动态。 / p>
任何想法如何解决这个问题?
可能是同位素在图像加载之前正在做它的事情。
var $ container = $('#container');
$ container.imagesLoaded(function(){
$ container.isotope({
// options ...
});
}) ;
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.
You can see here what is happening http://dl.dropbox.com/u/15358757/sd.jpg, that elements are on top of each other. but when I press on PSDs and then back to All it shows properly.
I don't have a default height for the container because I want to to be dynamic.
Any idea how I can fix this?
The problem is probably that Isotope is doing its thing before the images are loaded.
http://isotope.metafizzy.co/demos/images.html
http://isotope.metafizzy.co/docs/help.html#imagesloaded_plugin
var $container = $('#container');
$container.imagesLoaded(function() {
$container.isotope({
// options...
});
});
这篇关于Isotope jquery插件在Chrome上无法正常显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!