I’ve got this masonry generated list which originally comes from a mysql database. When I’m trying to append new data to the list, also from the mysql database via an external php, the new data just ends up on top of the ‘old’ data and not below it.
I’m guessing it’s because the masonry function doesn’t work because the same thing happens when I’m appending without the masonry line at the end.
The jQuery which brings the new data looks like this:
$('.loadmore').click( function(){
$.post('db_loadmore.php',{value:value}, function($data){
$('#list').append($data).masonry('appended', $data );
});
});
And the external php is just a simple mysql_fetch_array which puts the data inside of which is the same as the existing list.
Is it even possible to append new data from a mysql database or am I just doing it wrong?!
I found the error and fixed it. Apparently you have to have the same container in both the main masonry function and the append masonry. Hope it make’s sense..