问题
I'd like to use this plugin: http://packery.metafizzy.co/ with layout mode: meticulous as described on the frontpage. I went through every page of documentation and cannot find how to set it to meticulous instead of masonry layout which is default!
var $container = $('#grid_index');
// initialize
$container.packery({
itemSelector: '.item',
gutter: 0
});
Any ideas?
回答1:
To answer my question directly, layout mode "meticulous" is triggered automatically by setting: columnWidth
and rowHeight
in options.
Like this:
var $container = $('#grid_index');
var pckry = $container.data('packery');
// initialize
$container.packery({
itemSelector: '.item',
gutter: 0,
"columnWidth": 250,
"rowHeight": 250
});
来源:https://stackoverflow.com/questions/18871162/packery-how-to-change-layout-mode