A jQuery plugin to justify your Gallery.
include jquery.justifyGallery.js
js:
<script type="text/javascript" src="https://github.com/iekadou/jquery-justifyGallery/raw/master/js/jquery.justifyGallery.js></script>
code your gallery with markup like this
<div class="gallery">
<a href="https://github.com/iekadou/jquery-justifyGallery/blob/master/path/to/img1.jpg">
<img src="https://github.com/iekadou/jquery-justifyGallery/raw/master/path/to/thumb1.jpg" alt="thumb1">
</a>
<a href="https://github.com/iekadou/jquery-justifyGallery/blob/master/path/to/img2.jpg">
<img src="https://github.com/iekadou/jquery-justifyGallery/raw/master/path/to/thumb2.jpg" alt="thumb1">
</a>
</div>
activate the plugin on the gallery container
$('.gallery').justifyGallery();
JustifyGallery.defaults = {
'maxRowHeight': '300px',
'spacing': 2,
'resizeCSS': {'min-width': '0',
'min-height': '0',
'height': 'auto',
'width': 'auto',
'max-width': 'none',
'max-height': 'none'}
};
Copyright 2014 Jonas Braun under MIT license.