jQuery-Masonry Items Dont Rearrange on Hiding a Div/Element

寵の児 提交于 2019-12-13 04:28:17

问题


Im trying to implement a filter on the jQuery-masonry.
But the problem is if i hide a middle element, others dont rearrange.
This leaves lots of gutters in between. Tried the .masonry('reload');

Caan anyone please help.


回答1:


There is an open issue. Workaround: use :visible on your selector.

$('#container').masonry({
  itemSelector: '.mybrick:visible'
});


来源:https://stackoverflow.com/questions/12530966/jquery-masonry-items-dont-rearrange-on-hiding-a-div-element

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!