Skip to content

Instantly share code, notes, and snippets.

@alexbaumgertner
Last active October 13, 2015 10:02
Show Gist options
  • Save alexbaumgertner/d459108cbaa0c4187ca0 to your computer and use it in GitHub Desktop.
Save alexbaumgertner/d459108cbaa0c4187ca0 to your computer and use it in GitHub Desktop.
<script>
$(document).ready( function() {
var $grid = $('.row').masonry({
// main isotope options
itemSelector: '.row__item',
columnWidth: '.row__sizer',
gutter: '.gutter-sizer',
percentPosition: true,
});
$grid.imagesLoaded().progress( function() {
$grid.masonry();
$(document).trigger('grid:masonry');
});
});
</script>
<script>
$(document).on('grid:masonry', function() {
new AnimOnScroll( document.getElementById( 'row' ),
{
minDuration : 0.4,
maxDuration : 0.7,
viewportFactor : 0.2
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment