Skip to content

Instantly share code, notes, and snippets.

@jccovey
Created May 28, 2010 17:45
Show Gist options
  • Save jccovey/417468 to your computer and use it in GitHub Desktop.
Save jccovey/417468 to your computer and use it in GitHub Desktop.
jQuery Masonry Layout Plugin
http://desandro.com/resources/jquery-masonry/
http://desandro.com/mint/pepper/tillkruess/downloads/tracker.php?url=http://github.com/desandro/masonry/raw/master/js/jquery.masonry.min.js&remote
Configuring Masonry is fairly easy. Simply attach the .masonry() method to the wrapping container element in your jQuery script. Depending on the layout, you’ll most likely need to specify one option.
For layouts with elements that span multiple widths:
$('#wrapper').masonry({ columnWidth: 200 });
For layouts with elements that span the same width:
$('#wrapper').masonry({ singleMode: true });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment