This is the same question as this one, but I have a repro of the issue on JSFiddle up here. So I thought I'd repost.
JQuery Masonry seems to only assess the children of its container once, on first run. After that, it's impossible to get it to look at the DOM again to get it to reassess its children.
if you are using jQuery, this will solve all your problems.
You are including Masonry in your html/php page with something like this:
Instead, leave it like this:
And create the
js/masonry-init.js
file with the following:Never worry about it again!
I seem to have solved this by adding a line to reload the "bricks" to the
_reLayout
function in the JQuery Masonry code at line 305.Anyone see any problem with this?
You have to pass the new content to Masonry's appended method:
I updated your fiddle here.
I made use of the
reload
method:.masonry( 'reload' )
Here's the masonry doc for reload: