JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" type="text/css" href="http://tympanus.net/Development/AutomaticImageMontage/css/demo.css" />
<link rel="stylesheet" type="text/css" href="http://tympanus.net/Development/AutomaticImageMontage/css/style.css" />
<link rel="stylesheet" type="text/css" href="http://christophercliff.github.com/sausage//lib/sausage.reset.css">
<link rel="stylesheet" type="text/css" href="http://christophercliff.github.com/sausage//lib/sausage.couchdb.css">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://tympanus.net/Development/AutomaticImageMontage/js/jquery.montage.min.js"></script>
<script type="text/javascript" src="http://christophercliff.github.com/sausage/jquery.sausage.js"></script>
<div class="container">
<div class="page" id="am1" style="width:600px;margin:0px auto;">
<a href="#"><img src="http://tympanus.net/Development/AutomaticImageMontage/images/1.jpg"></img></a>
<a href="#"><img src="http://tympanus.net/Development/AutomaticImageMontage/images/2.jpg"></img></a>
<a href="#"><img src="http://tympanus.net/Development/AutomaticImageMontage/images/3.jpg"></img></a>
<a href="#"><img src="http://tympanus.net/Development/AutomaticImageMontage/images/4.jpg"></img></a>
<a href="#"><img src="http://tympanus.net/Development/AutomaticImageMontage/images/5.jpg"></img></a>
<a href="#"><img src="http://tympanus.net/Development/AutomaticImageMontage/images/6.jpg"></img></a>
<a href="#"><img src="http://tympanus.net/Development/AutomaticImageMontage/images/7.jpg"></img></a>
<a href="#"><img src="http://tympanus.net/Development/AutomaticImageMontage/images/8.jpg"></img></a>
<a href="#"><img...
CSS
#am1 { -moz-box-shadow:0px 0px 5px #333333; -webkit-box-shadow:0px 0px 5px #333333; box-shadow:0px 0px 5px #333333;}
JavaScript
$(function() {
$(window).sausage({
content: function(i, $page) {
return '<span class="sausage-span">' + $page.find('.anchor').first().text() + '</span>'
}
})
var $container = $('#am-container,#am1'),
$imgs = $container.find('img').hide(),
totalImgs = $imgs.length,
cnt = 0;
$imgs.each(function(i) {
var $img = $(this);
$('<img/>').load(function() {++cnt;
if (cnt === totalImgs) {
$imgs.show();
$container.montage({
fillLastRow: true,
alternateHeight: true,
alternateHeightRange: {
min: 100,
max: 200
},
margin: 1
})
}
}).attr('src', $img.attr('src'))
})
});