0
|
1 |
--- |
|
2 |
title: no items |
|
3 |
layout: default |
|
4 |
category: tests |
|
5 |
--- |
|
6 |
|
|
7 |
<section id="copy"> |
|
8 |
<p>What happens when there are no items for Isotope? If no items match `itemSelector`, container collapses. Plugin still <code>return this</code>.</p> |
|
9 |
</section> |
|
10 |
|
|
11 |
<div id="container"> |
|
12 |
{% for element in site.elements limit:20 %} |
|
13 |
{% include element-partial.html %} |
|
14 |
{% endfor %} |
|
15 |
</div> <!-- #container --> |
|
16 |
|
|
17 |
<script src="../{{ site.jquery_js }}"></script> |
|
18 |
<script src="../{{ site.isotope_js }}"></script> |
|
19 |
<script> |
|
20 |
$(function(){ |
|
21 |
|
|
22 |
var $container = $('#container'); |
|
23 |
|
|
24 |
$container.isotope({ |
|
25 |
itemSelector: '.foo' |
|
26 |
}).css('border', '10px solid'); |
|
27 |
|
|
28 |
}); |
|
29 |
</script> |