This is what I currently have, however, the image is compressed to fit the size of the text's width. No matter what size I specify in the html, it doesn't change. Any light on this matter?
$('#append').click(function(){
var $boxes = $('<div class="box">'+balls($iterator)+'</div>');
$container.append( $boxes ).masonry( 'appended', $boxes );
});
function balls($i){
$iterator += 1;
return '<p>'+$test[$iterator][1][2]+'</p><p><img src="'+$test[$iterator][2]+'" alt="'+$test[$iterator][1][2]+'" height="196" width="319"></a></p>';
}