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.
85 lines
2.5 KiB
85 lines
2.5 KiB
14 years ago
|
---
|
||
|
title: Tiny text
|
||
|
layout: demo
|
||
|
category: tests
|
||
|
lorem: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||
|
---
|
||
|
|
||
|
<style>
|
||
|
.text-box {
|
||
|
width: 200px;
|
||
|
margin: 10px;
|
||
|
color: #000;
|
||
|
float: left;
|
||
|
font-size: 11px;
|
||
|
line-height: 1.3em;
|
||
|
padding: 10px;
|
||
|
}
|
||
|
|
||
|
.blue { background: #88F; }
|
||
|
.red { background: #F88; }
|
||
|
</style>
|
||
|
|
||
|
<section id="copy">
|
||
|
<p>Test to see how IE7 deals with type rendering</p>
|
||
|
</section>
|
||
|
|
||
|
<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="#red">red</a></li>
|
||
|
<li><a href="#blue">blue</a></li>
|
||
|
</ul>
|
||
|
|
||
|
</section> <!-- #options -->
|
||
|
|
||
|
<div id="container" class="clearfix">
|
||
|
<div class="red text-box">{{ page.lorem }}</div>
|
||
|
<div class="blue text-box">{{ page.lorem }}</div>
|
||
|
<div class="red text-box">{{ page.lorem }}</div>
|
||
|
<div class="blue text-box">{{ page.lorem }}</div>
|
||
|
<div class="red text-box">{{ page.lorem }}</div>
|
||
|
<div class="blue text-box">{{ page.lorem }}</div>
|
||
|
<div class="red text-box">{{ page.lorem }}</div>
|
||
|
<div class="blue text-box">{{ page.lorem }}</div>
|
||
|
<div class="red text-box">{{ page.lorem }}</div>
|
||
|
<div class="blue text-box">{{ page.lorem }}</div>
|
||
|
<div class="red text-box">{{ page.lorem }}</div>
|
||
|
<div class="blue text-box">{{ page.lorem }}</div>
|
||
|
<div class="red text-box">{{ page.lorem }}</div>
|
||
|
<div class="blue text-box">{{ page.lorem }}</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<script src="../{{ site.jquery_js }}"></script>
|
||
|
<script src="../{{ site.isotope_js }}"></script>
|
||
|
<script src="../js/fake-element.js"></script>
|
||
|
<script>
|
||
|
|
||
|
|
||
|
$(function(){
|
||
|
|
||
|
var $container = $('#container');
|
||
|
|
||
|
|
||
|
|
||
|
$container.isotope({
|
||
|
});
|
||
|
|
||
|
$('#filters').find('a').click(function(){
|
||
|
// get href attribute, minus the #, plus a . to make it a class
|
||
|
var filterName = '.' + $(this).attr('href').slice(1);
|
||
|
filterName = filterName === '.show-all' ? '*' : filterName;
|
||
|
$container.isotope({ filter: filterName })
|
||
|
return false;
|
||
|
});
|
||
|
|
||
|
{% include option-buttons.js %}
|
||
|
|
||
|
|
||
|
|
||
|
});
|
||
|
</script>
|