Created
December 18, 2013 19:22
-
-
Save dylan-k/8028186 to your computer and use it in GitHub Desktop.
masonry for bootstrap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment