最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Packery - how to change layout mode? - Stack Overflow

programmeradmin0浏览0评论

I'd like to use this plugin: / 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?

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?

Share Improve this question asked Sep 18, 2013 at 11:35 user796443user796443
Add a ment  | 

1 Answer 1

Reset to default 12

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
});
发布评论

评论列表(0)

  1. 暂无评论