问题
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