I have the following function:
namespace.utils.pageReorder(feed, function() {
console.log('complete');
// do some stuff here no reorder has completed
});
-------------
pageReorder: function(feed, callback) {
feed.masonry('reloadItems');
feed.masonry('layout');
callback();
},
What i need to be able to do is to only call the callback once the masonry layout has completed. I know masonry has the following method but im not sure how to integrate it into my function.
msnry.on( 'layoutComplete', function() {
console.log('layout is complete, just once');
return true;
});
Thanks Pete