|
|
@ -5,30 +5,11 @@ category: tests |
|
|
|
--- |
|
|
|
--- |
|
|
|
|
|
|
|
|
|
|
|
<section id="copy"> |
|
|
|
<section id="copy"> |
|
|
|
<p></p> |
|
|
|
<p><code>itemPositionDataEnabled</code> option is enabled. </p> |
|
|
|
</section> |
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
|
|
<section id="options" class="clearfix"> |
|
|
|
<section id="options" class="clearfix"> |
|
|
|
|
|
|
|
|
|
|
|
<h3>Filters</h3> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul id="filters" class="option-set floated clearfix"> |
|
|
|
|
|
|
|
<li><a href="#show-all" class="selected">show all</a></li> |
|
|
|
|
|
|
|
<li><a href="#metalloid">metalloid</a></li> |
|
|
|
|
|
|
|
<li><a href="#metal">metal</a></li> |
|
|
|
|
|
|
|
<li><a href="#alkali">alkali</a></li> |
|
|
|
|
|
|
|
<li><a href="#alkaline-earth">alkaline-earth</a></li> |
|
|
|
|
|
|
|
<li><a href="#inner-transition">inner-transition</a></li> |
|
|
|
|
|
|
|
<li><a href="#lanthanoid">lanthanoid</a></li> |
|
|
|
|
|
|
|
<li><a href="#actinoid">actinoid</a></li> |
|
|
|
|
|
|
|
<li><a href="#transition">transition</a></li> |
|
|
|
|
|
|
|
<li><a href="#post-transition">post-transition</a></li> |
|
|
|
|
|
|
|
<li><a href="#nonmetal">nonmetal</a></li> |
|
|
|
|
|
|
|
<li><a href="#other">other</a></li> |
|
|
|
|
|
|
|
<li><a href="#halogen">halogen</a></li> |
|
|
|
|
|
|
|
<li><a href="#noble-gas">noble-gas</a></li> |
|
|
|
|
|
|
|
</ul> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% include sort-buttons.html %} |
|
|
|
{% include sort-buttons.html %} |
|
|
|
|
|
|
|
|
|
|
|
<h3>Etc</h3> |
|
|
|
<h3>Etc</h3> |
|
|
@ -39,7 +20,7 @@ category: tests |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
</section> <!-- #options --> |
|
|
|
</section> <!-- #options --> |
|
|
|
|
|
|
|
|
|
|
|
<div id="container"> |
|
|
|
<div id="container" class="clickable clearfix"> |
|
|
|
{% for element in site.elements limit:40 %} |
|
|
|
{% for element in site.elements limit:40 %} |
|
|
|
{% include element-partial.html %} |
|
|
|
{% include element-partial.html %} |
|
|
|
{% endfor %} |
|
|
|
{% endfor %} |
|
|
@ -48,16 +29,25 @@ category: tests |
|
|
|
<script src="../{{ site.jquery_js }}"></script> |
|
|
|
<script src="../{{ site.jquery_js }}"></script> |
|
|
|
<script src="../{{ site.isotope_js }}"></script> |
|
|
|
<script src="../{{ site.isotope_js }}"></script> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
|
|
|
|
|
|
|
|
$(function(){ |
|
|
|
$(function(){ |
|
|
|
|
|
|
|
|
|
|
|
var $container = $('#container'); |
|
|
|
var $container = $('#container'); |
|
|
|
|
|
|
|
|
|
|
|
{% include sort-buttons.js %} |
|
|
|
{% include sort-buttons.js %} |
|
|
|
|
|
|
|
|
|
|
|
// change size of clicked element |
|
|
|
// toggle variable sizes of all elements |
|
|
|
$container.find('.element').live('click', function(){ |
|
|
|
$('#toggle-sizes').find('a').click(function(){ |
|
|
|
$(this).toggleClass('large'); |
|
|
|
$container |
|
|
|
$container.isotope('reLayout'); |
|
|
|
.toggleClass('variable-sizes') |
|
|
|
|
|
|
|
.isotope('reLayout'); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// log item position |
|
|
|
|
|
|
|
$container.find('.element').click(function(){ |
|
|
|
|
|
|
|
var position = $(this).data('isotope-item-position'); |
|
|
|
|
|
|
|
console.log( position.x + ', ' + position.y ); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$container.isotope({ |
|
|
|
$container.isotope({ |
|
|
|