personal-website/assets/js/masonry.js

13 lines
293 B
JavaScript

$(document).ready(function() {
// Init Masonry
var $grid = $('.grid').masonry({
gutter: 10,
horizontalOrder: true,
itemSelector: '.grid-item',
});
// Layout Masonry after each image loads
$grid.imagesLoaded().progress( function() {
$grid.masonry('layout');
});
});