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.
48 lines
1.1 KiB
48 lines
1.1 KiB
14 years ago
|
---
|
||
13 years ago
|
title: destroy
|
||
14 years ago
|
layout: default
|
||
14 years ago
|
category: tests
|
||
|
---
|
||
|
|
||
|
<style>
|
||
|
#container {
|
||
|
width: 80%;
|
||
|
height: 80%;
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
<section id="copy">
|
||
14 years ago
|
<p>Click <em>init</em> button the <em>destroy</em>. Original CSS, pre-init, should be re-applied, all items back to visibility.</p>
|
||
|
</section>
|
||
|
|
||
|
<section id="options">
|
||
|
<button id="init">Init Isotope instance</button>
|
||
|
<button id="destroy">Destroy Isotope instance</button>
|
||
14 years ago
|
</section>
|
||
|
|
||
|
<div id="container" style="height: 600px">
|
||
|
{% for element in site.elements limit:20 %}
|
||
|
{% include element-partial.html %}
|
||
|
{% endfor %}
|
||
|
</div> <!-- #container -->
|
||
|
|
||
|
<script src="../{{ site.jquery_js }}"></script>
|
||
|
<script src="../{{ site.isotope_js }}"></script>
|
||
|
<script>
|
||
|
$(function(){
|
||
|
|
||
|
var $container = $('#container');
|
||
|
|
||
14 years ago
|
$('#init').click(function(){
|
||
|
$container.isotope({
|
||
|
itemSelector: '.element',
|
||
|
filter: '.metal'
|
||
|
});
|
||
|
});
|
||
|
|
||
|
$('#destroy').click(function(){
|
||
|
$container.isotope('destroy');
|
||
14 years ago
|
});
|
||
|
|
||
|
});
|
||
|
</script>
|