Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
GravityView Demo Site - DIY Layout Code
<script src="https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.min.js"></script>
<script src="https://unpkg.com/imagesloaded@4/imagesloaded.pkgd.min.js"></script>
<script>
jQuery( document ).ready( function( $ ) {
// Fixed Layout
var $grid = $('.gv-diy-container').isotope({
// options...
itemSelector: '.gv-diy-view',
masonry: {
columnWidth: 150
}
});
// layout Isotope after each image loads
$grid.imagesLoaded().progress( function() {
$grid.isotope('layout');
});
});
</script>
<style>
.gv-diy-container h3 { padding: .5em 0; margin: 0; }
.gv-diy-container p { padding-top: 0; margin-bottom: 2em; }
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.