check: http://masonry.desandro.com/events.html you can use following masonry event:
msnry.on( 'layoutComplete', masonry_refreshed );
note that msnry is the name of the variable in which you defined masonry.
EDIT: Full demo code:
$(document).ready(function(){
var container = document.querySelector('#container');
var msnry = new Masonry(container,{
itemSelector: '.item',
columnWidth: 70
});
msnry.on( 'layoutComplete', masonry_refresh );
function masonry_refresh(){
console.log("Masonry resized!");
}
});
demo: http://jsfiddle.net/Cd6ce/1/
EDIT2: If you really want to use it the jQuery way:
$(document).ready(function(){
$('#container').masonry({
itemSelector: '.item',
columnWidth: 70
});
var msnry = $('#container').data('masonry');
msnry.on( 'layoutComplete', masonry_refresh );
function masonry_refresh(){
console.log("Masonry resized!");
}
});