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.
268 lines
13 KiB
268 lines
13 KiB
<!doctype html> |
|
<html lang="en"> |
|
<head> |
|
<meta charset="utf-8" /> |
|
<title>jQuery Molequul › Basic multi-column example</title> |
|
|
|
<link rel="stylesheet" href="css/style.css" media="screen" /> |
|
|
|
<!-- scripts are located at the bottom of the markup --> |
|
|
|
</head> |
|
<body> |
|
|
|
<div id="site-nav"> |
|
<h1>jQuery Molequul</h1> |
|
<ul> |
|
<li><a href=".">Primer</a></li> |
|
<li><a href="basic-single-column.html">Basic single-column</a></li> |
|
<li class="selected"><a href="basic-multi-column.html">Basic multi-column</a> |
|
<ul> |
|
<li><a href="#content">Top</a></li> |
|
<li><a href="#code">Code</a></li> |
|
<li><a href="#demo">Demo</a></li> |
|
</ul> |
|
</li> |
|
<li><a href="tumblelog.html">Tumblelog</a></li> |
|
<li><a href="appending.html">Appending</a></li> |
|
<li><a href="infinite-scroll.html">Infinite Scroll</a></li> |
|
<li><a href="animating-jquery.html">Animating with jQuery</a></li> |
|
<li><a href="animating-css-transitions.html">Animating with CSS transitions</a></li> |
|
<li><a href="filtering.html">Filtering</a></li> |
|
<li><a href="filtering-hashes.html#red">Filtering hashes</a></li> |
|
</ul> |
|
</div> |
|
|
|
<div id="content"> |
|
|
|
<h1>Basic multi-column example</h1> |
|
|
|
<div class="copy"> |
|
<p>This example demonstrates the basic effect of jQuery Molequul. All ‘bricks’ have outerWidths (width + padding + border + margin) that are multiples of 100 pixels. <code>columnWidth</code> is set to <code>100</code>.</p> |
|
|
|
<pre id="code"><code><span class="keyword">$</span>(<span class="string">'#demo'</span>).molequul({ |
|
columnWidth: <span class="constant">100</span>, |
|
itemSelector: <span class="string">'.box'</span> |
|
});</code></pre> |
|
|
|
|
|
<p><code>itemSelector</code> is specified to rearrange all <code>box</code> elements, including the ones inside another <code>div</code>. </p> |
|
|
|
<pre><code><span class="storage"><div id=<span class="string">"demo"</span> class=<span class="string">"wrap"</span>></span> |
|
<span class="storage"><div class=<span class="string">"box col2"</span>></span>...<span class="storage"></div></span> |
|
<span class="storage"><div class=<span class="string">"box col3"</span>></span>...<span class="storage"></div></span> |
|
<span class="storage"><div class=<span class="string">"box col1"</span>></span>...<span class="storage"></div></span> |
|
<span class="storage"><div class=<span class="string">"box col1"</span>></span>...<span class="storage"></div></span> |
|
<span class="storage"><div></span> |
|
<span class="storage"><div class=<span class="string">"box col2"</span>></span>...<span class="storage"></div></span> |
|
<span class="storage"><div class=<span class="string">"box col2"</span>></span>...<span class="storage"></div></span> |
|
<span class="storage"><div class=<span class="string">"box col1"</span>></span>...<span class="storage"></div></span> |
|
<span class="storage"></div></span> |
|
<span class="storage"></div></span> <span class="comment"><!-- #demo --></span></code></pre> |
|
|
|
|
|
|
|
</div><!-- .copy --> |
|
|
|
<div id="demo" class="wrap"> |
|
|
|
<div class="box col2"> |
|
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>Donec nec justo eget felis facilisis fermentum. Aliquam porttitor mauris sit amet orci. </p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>Fusce accumsan mollis eros. Pellentesque a diam sit amet mi ullamcorper vehicula </p> |
|
</div> |
|
|
|
<div class="box"> |
|
<h2>This is the box with no width set</h2> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<h2>Sit amet mi ullamcorper vehicula</h2> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>adipiscing in, lacinia vel, tellus. Suspendisse ac urna. Etiam pellentesque mauris ut lectus.</p> |
|
</div> |
|
|
|
<div class="box col2"> |
|
<p>Sit amet mi ullamcorper vehicula</p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>Phasellus pede arcu, dapibus eu, fermentum et, dapibus sed, urna.</p> |
|
</div> |
|
|
|
<div class="box col2"> |
|
<p>Ut condimentum mi vel tellus. Suspendisse laoreet. Fusce ut est sed dolor gravida convallis. Morbi vitae ante. Vivamus ultrices luctus nunc. Suspendisse et dolor. Etiam dignissim. Proin malesuada adipiscing lacus. Donec metus. Curabitur gravida.</p> |
|
<p>Phasellus pede arcu, dapibus eu, fermentum et, dapibus sed, urna.</p> |
|
</div> |
|
|
|
<div class="box col3"> |
|
<p>Sed ac risus. Phasellus lacinia, magna a ullamcorper laoreet, lectus arcu pulvinar risus, vitae facilisis libero dolor a purus. Sed vel lacus. Mauris nibh felis, adipiscing varius, adipiscing in, lacinia vel, tellus. Suspendisse ac urna. Etiam pellentesque mauris ut lectus. Nunc tellus ante, mattis eget, gravida vitae, ultricies ac, leo. Integer leo pede, ornare a, lacinia eu, vulputate vel, nisl.</p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>Morbi purus libero, faucibus adipiscing, commodo quis, gravida id, est. Sed lectus. Praesent elementum hendrerit tortor. Sed semper lorem at felis.</p> |
|
</div> |
|
|
|
<div> |
|
<div class="box col2"> |
|
<p>Vestibulum volutpat, lacus a ultrices sagittis,</p> |
|
<p>Fusce accumsan mollis eros. Pellentesque a diam sit amet mi ullamcorper vehicula </p> |
|
</div> |
|
|
|
<div class="box col2"> |
|
<p>Sit amet mi ullamcorper vehicula</p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>Morbi purus libero</p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p> |
|
</div> |
|
|
|
<div class="box col3"> |
|
<p>Donec nec justo eget felis facilisis fermentum. Aliquam porttitor mauris sit amet orci. Aenean dignissim pellentesque felis.</p> |
|
<p>Vestibulum volutpat, lacus a ultrices sagittis,</p> |
|
<ul> |
|
<li>Lacus a ultrices sagittis</li> |
|
<li>Democratis</li> |
|
<li>Plummus</li> |
|
</ul> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>Fusce accumsan mollis eros. Pellentesque a diam sit amet mi ullamcorper vehicula </p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>Sit amet mi ullamcorper vehicula</p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<h2>Morbi purus libero</h2> |
|
</div> |
|
|
|
|
|
<div class="box col2"> |
|
<p>Ut condimentum mi vel tellus. Suspendisse laoreet. Fusce ut est sed dolor gravida convallis. Morbi vitae ante. Vivamus ultrices luctus nunc. Suspendisse et dolor. Etiam dignissim. Proin malesuada adipiscing lacus. Donec metus. Curabitur gravida.</p> |
|
<p>Phasellus pede arcu, dapibus eu, fermentum et, dapibus sed, urna.</p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>Fusce accumsan mollis eros. Pellentesque a diam sit amet mi ullamcorper vehicula</p> |
|
</div> |
|
|
|
<div class="box col3"> |
|
<p>Morbi purus libero, faucibus adipiscing, commodo quis, gravida id, est. Sed lectus. Praesent elementum hendrerit tortor. Sed semper lorem at felis.</p> |
|
<p>Sed ac risus. Phasellus lacinia, magna a ullamcorper laoreet, lectus arcu pulvinar risus, vitae facilisis libero dolor a purus. Sed vel lacus. Mauris nibh felis, adipiscing varius, adipiscing in, lacinia vel, tellus. Suspendisse ac urna. Etiam pellentesque mauris ut lectus. Nunc tellus ante, mattis eget, gravida vitae, ultricies ac, leo. Integer leo pede, ornare a, lacinia eu, vulputate vel, nisl.</p> |
|
<p>Sed ac risus. Phasellus lacinia, magna a ullamcorper laoreet, lectus arcu pulvinar risus, vitae facilisis libero dolor a purus. Sed vel lacus. Mauris nibh felis, adipiscing varius, adipiscing in, lacinia vel, tellus. Suspendisse ac urna. Etiam pellentesque mauris ut lectus. Nunc tellus ante, mattis eget, gravida vitae, ultricies ac, leo. Integer leo pede, ornare a, lacinia eu, vulputate vel, nisl.</p> |
|
</div> |
|
|
|
|
|
<div class="box col1"> |
|
<p>adipiscing in, lacinia vel, tellus. Suspendisse ac urna. Etiam pellentesque mauris ut lectus.</p> |
|
</div> |
|
|
|
<div class="box col2"> |
|
<p>Sit amet mi ullamcorper vehicula</p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>Phasellus pede arcu, dapibus eu, fermentum et, dapibus sed, urna.</p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<h2>Fusce accumsan mollis eros. Pellentesque a diam sit amet mi ullamcorper vehicula </h2> |
|
</div> |
|
|
|
<div class="box col2"> |
|
<p>Ut convallis, sem sit amet interdum consectetuer, odio augue aliquam leo, nec dapibus tortor nibh sed augue.</p> |
|
<p>Ut condimentum mi vel tellus. Suspendisse laoreet. Fusce ut est sed dolor gravida convallis. Morbi vitae ante. Vivamus ultrices luctus nunc. Suspendisse et dolor. Etiam dignissim. Proin malesuada adipiscing lacus. Donec metus. Curabitur gravida.</p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
|
|
<ul> |
|
<li>Lacus a ultrices sagittis</li> |
|
<li>Democratis</li> |
|
<li>Plummus</li> |
|
</ul> |
|
</div> |
|
|
|
<div class="box col3"> |
|
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus hendrerit. Pellentesque aliquet nibh nec urna. In nisi neque, aliquet vel, dapibus id, mattis vel, nisi. Sed pretium, ligula sollicitudin laoreet viverra, tortor libero sodales leo, eget blandit nunc tortor eu nibh. Nullam mollis. Ut justo. Suspendisse potenti.</p> |
|
<p>Fusce accumsan mollis eros. Pellentesque a diam sit amet mi ullamcorper vehicula </p> |
|
<p>Morbi interdum mollis sapien. Sed ac risus. Phasellus lacinia, magna a ullamcorper laoreet, lectus arcu pulvinar risus, vitae facilisis libero dolor a purus.</p> |
|
</div> |
|
|
|
<div class="box col2"> |
|
<p>adipiscing in, lacinia vel, tellus. Suspendisse ac urna. Etiam pellentesque mauris ut lectus.</p> |
|
<p>Ut convallis, sem sit amet interdum consectetuer, odio augue aliquam leo, nec dapibus tortor nibh sed augue. Sed vel lacus. Mauris nibh felis, adipiscing varius, adipiscing in, lacinia vel, tellus. Suspendisse ac urna. Etiam pellentesque mauris ut lectus. Nunc tellus ante, mattis eget, gravida vitae, ultricies ac, leo. Integer leo pede, ornare a, lacinia eu, vulputate vel, nisl.</p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>Phasellus pede arcu, dapibus eu, fermentum et, dapibus sed, urna.</p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>Fusce accumsan mollis eros. Pellentesque a diam sit amet mi ullamcorper vehicula</p> |
|
</div> |
|
|
|
<div class="box col3"> |
|
<p>Morbi purus libero, faucibus adipiscing, commodo quis, gravida id, est. Sed lectus. Praesent elementum hendrerit tortor. Sed semper lorem at felis.</p> |
|
<p>Sed ac risus. Phasellus lacinia, magna a ullamcorper laoreet, lectus arcu pulvinar risus, vitae facilisis libero dolor a purus. Sed vel lacus. Mauris nibh felis, adipiscing varius, adipiscing in, lacinia vel, tellus. Suspendisse ac urna. Etiam pellentesque mauris ut lectus. Nunc tellus ante, mattis eget, gravida vitae, ultricies ac, leo. Integer leo pede, ornare a, lacinia eu, vulputate vel, nisl.</p> |
|
</div> |
|
|
|
|
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>Donec nec justo eget felis facilisis fermentum. Aliquam porttitor mauris sit amet orci. </p> |
|
</div> |
|
|
|
<div class="box col1"> |
|
<p>Fusce accumsan mollis eros. Pellentesque a diam sit amet mi ullamcorper vehicula </p> |
|
</div> |
|
|
|
<div class="box col2"> |
|
<p>Vestibulum volutpat, lacus a ultrices sagittis,</p> |
|
<p>Fusce accumsan mollis eros. Pellentesque a diam sit amet mi ullamcorper vehicula </p> |
|
<p>Morbi purus libero, faucibus adipiscing, commodo quis, gravida id, est. Sed lectus. Praesent elementum hendrerit tortor. Sed semper lorem at felis.</p> |
|
</div> |
|
|
|
</div> <!-- #demo --> |
|
|
|
<p id="footer"> |
|
jQuery Molequul by <a href="http://desandro.com/">David DeSandro</a> |
|
</p> |
|
|
|
</div> <!-- #content --> |
|
|
|
<script src="js/jquery-1.4.2.min.js"></script> |
|
<script src="../jquery.molequul.js"></script> |
|
<script> |
|
$(function(){ |
|
|
|
$('#demo').molequul({ |
|
columnWidth: 100, |
|
itemSelector: '.box' |
|
}); |
|
|
|
}); |
|
</script> |
|
|
|
</body> |
|
</html> |