I just sort it out!! I found my asnwer in this other topic. I leave here the reponse…
I was loading the plugin in a bad way. The point is loading the script like appears in masonry docs I have the problem @christophzollinger was talking about.
Load masonry the simple way:
$(function(){
$('#container').masonry({
// options
itemSelector : '.box',
columnWidth : 258
});
});
And in the settings page of the plugin…in Javascript to be called… add:
var $newElems = $( newElements ).css({ opacity: 0 });
$newElems.imagesLoaded(function(){
$newElems.animate({ opacity: 1 });
$('#container').masonry( 'appended', $newElems, true );
});
Just change the selectors.. ??