check: http://masonry.desandro.com/events.html
you can use the following masonry event:
msnry.on( 'layoutComplete', masonry_refreshed );
Note that msnry is the name of the variable in which you defined the 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: jQuery:
$(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!");
}
});
demo: http://jsfiddle.net/Cd6ce/4/