desandro / colcade

Lightweight masonry layout
488 stars 21 forks source link

Not working with ajax loaded items #21

Open diviengine opened 4 years ago

diviengine commented 4 years ago

Hi.

Fistly thank you for making this!

Hopefully this is an issue on my end. I have items that are being loaded via ajax.

I have this success : function( data ) { if ( data ) { jQuery('.filtered-posts').html( data.posts ); jQuery('.filtered-posts').colcade({ columns: '.grid-col', items: '.grid-item' }); } }

it is not putting the grid-items into the col.

Any ideas on how to solve this?

zitrusblau commented 4 years ago

you might consider using the append/prepend method of colcade after initializing. Is data.posts a jquery object/dom list?

diviengine commented 4 years ago

Did not work either.

I managed to code my own masonry now - thanks!