Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery isotope plugin container height will not grow with isotope-item (same with masonry)

I have an isotope-item that will grow in height when somebody comments inside of it. When it grows, how do I tell the main isotope container to grow with it? Right now what is happening is, as the isotope-item grows, the isotope container maintains it's initial height that was set when calling $(".home_main").isotope(); So when I leave comments inside the isotope-item, the item grows, then is cut off by the main container. Thanks.

I have seen that you can set resizesContainer: true but this hasn't helped me. Thanks.

Not sure if it makes any difference but I have also tried this with the Masonry jquery plugin as well (seems pretty similar) and had the same problem.

like image 810
botbot Avatar asked Sep 28 '12 22:09

botbot


2 Answers

Found the answer here:

https://github.com/desandro/isotope/issues/275

You have to call relayout like this:

$("#your_container").isotope( 'reLayout' )
like image 93
botbot Avatar answered Oct 24 '22 02:10

botbot


In Isotope V2 the syntax is

$("#your_container").isotope('layout')
like image 22
Kumar Avatar answered Oct 24 '22 04:10

Kumar