Freemasonry - automatic adjustment when changing the height of an element

I use masonry in my application. Everything worked perfectly, except that the height of the objects changes (like an accordion), the masonry does not adjust the layout. What can I do to fix this?

+5
source share
2 answers

Whenever items change, you must tell masonary to reinstall everything:

$('.ui-accordion').bind('accordionchange', function(event, ui) { $('#container').masonry(); }); 
+6
source
 $grid.on( 'shown.bs.collapse hidden.bs.collapse' , function() { $grid.masonry(); }); 
0
source

Source: https://habr.com/ru/post/1443201/


All Articles