dylan-k
12/18/2013 - 7:22 PM

masonry for bootstrap

masonry for bootstrap

<!--
Snippet Name: Masonry for Bootstrap
Description: Masonry is a JavaScript grid layout library. This code will add masonry abilities to any Bootstrap page.
Usage: paste this sucker at the bottom of your HTML. Note the #container and .thumbnail items. You can change those as needed.
-->


<!-- Load JS and start masonry -->
    <script type="text/javascript" src="http://masonry.desandro.com/masonry.pkgd.min.js"></script>     
    <script type="text/javascript">
      // MASSONRY Without jquery
      var container = document.querySelector('#container');
      var msnry = new Masonry( container, {
        itemSelector: '.thumbnail',
        columnWidth: '.thumbnail',                
      });      
    </script>