admin管理员组文章数量:1393920
I am using masonry in my application. Everything worked fine except when the height of the items change (like an accordion) masonry is not adjusting the layout. What can I do to fix it?
I am using masonry in my application. Everything worked fine except when the height of the items change (like an accordion) masonry is not adjusting the layout. What can I do to fix it?
Share Improve this question asked Oct 31, 2012 at 10:26 amirnuriamirnuri 531 silver badge4 bronze badges 2- 1 Could you show some code? What have you tried so far? – user254875486 Commented Oct 31, 2012 at 10:46
- Can you provide more code from your app? – VMAtm Commented Oct 31, 2012 at 10:46
2 Answers
Reset to default 6Whenever the items are resized, you need to tell masonary to re-layout everything:
$('.ui-accordion').bind('accordionchange', function(event, ui) {
$('#container').masonry();
});
$grid.on( 'shown.bs.collapse hidden.bs.collapse' , function() {
$grid.masonry();
});
本文标签: javascriptMasonryauto adjusting when the height of an item changesStack Overflow
版权声明:本文标题:javascript - Masonry - auto adjusting when the height of an item changes - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744083748a2588129.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论