You are here: Foswiki>System Web>JQueryPlugin>JQueryMasonry (2024-12-23, UnknownUser)Edit Attach
Homepage: https://masonry.desandro.com
Author(s): David DeSandro
Version: 4.2.2
Masonry is a JavaScript grid layout library. It works by placing elements in optimal position based on available vertical space, sort of like a mason fitting stones in a wall. You've probably seen it in use all over the Internet.
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 });
All containers classified as jqMasonry
will be processed by this plugin. Options can be specified using HTML5 data attributes.
<div class="jqMasonry" data-item-selector=".grid-item"> <div class="grid-item">...</div> <div class="grid-item">...</div> <div class="grid-item">...</div> ... </div>
All options are optional, but columnWidth and itemSelector are recommended.
columnWidth: 240
itemSelector: '.grid-item'
gutter: 0
percentPosition: false
true
integer values in columnWidth
and gutter
will be in percentage instead of in pixel stamp: 'item selector'
isFitWidth: false
isOriginLeft: true
isOriginLeft: true
. Set isOriginLeft: false
for right-to-left layouts. isOriginTop: true
isOriginTop: true
. Set isOriginTop: false
for bottom-up layouts. It's like Tetris! containerStyle: {position:relative}
null
to disable any css transitionDuration: '0.4s'
Duration of the transition when items change position or appearance, set in a CSS time format. isResizeBound: true
isInitLayout: true
See more demos at http://masonry.desandro.com/
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.
Donec nec justo eget felis facilisis fermentum. Aliquam porttitor mauris sit amet orci.
Fusce accumsan mollis eros. Pellentesque a diam sit amet mi ullamcorper vehicula
Sit amet mi ullamcorper vehicula
adipiscing in, lacinia vel, tellus. Suspendisse ac urna. Etiam pellentesque mauris ut lectus.
Sit amet mi ullamcorper vehicula
Phasellus pede arcu, dapibus eu, fermentum et, dapibus sed, urna.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.
Donec nec justo eget felis facilisis fermentum. Aliquam porttitor mauris sit amet orci.
Fusce accumsan mollis eros. Pellentesque a diam sit amet mi ullamcorper vehicula
Sit amet mi ullamcorper vehicula
adipiscing in, lacinia vel, tellus. Suspendisse ac urna. Etiam pellentesque mauris ut lectus.
Sit amet mi ullamcorper vehicula
Phasellus pede arcu, dapibus eu, fermentum et, dapibus sed, urna.
Edit | Attach | Print version | History: r1 | Backlinks | View wiki text | Edit wiki text | More topic actions
Topic revision: r1 - 2024-12-23, UnknownUser
Copyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback