mirror of https://github.com/metafizzy/isotope
Filter & sort magical layouts
http://isotope.metafizzy.co
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
899 B
899 B
title | category | layout | related |
---|---|---|---|
Troubleshooting | docs | doc | etc |
Images
Most layout modes (i.e masonry, fitRows) need to measure the size of each item to appropriately account for its space in the layout. Unloaded images can cause item elements to overlap one another. Isotope layouts should be initialized after all inner content has loaded. For images, the best method is to specify the width and height of images inline.
{% highlight html %}
{% endhighlight %}
If you’re using a PHP-based CMS, you can use the getimagesize function.
Another solution is to initialize Isotope inside $(window).load()
instead of $(document).ready()
.
{% highlight javascript %}
$(window).load(function(){ $('#container').isotope({ // options... }); });
{% endhighlight %}