I want to hide my content until Masonry has had a chance to style it (to prevent the dreaded flash of unstyled content), and then hide the loader gif . Here is a code snippet:
var $container = $('#deals');
$(window).load(function(){
$container.masonry({
itemSelector : '.deals-wrapper',
columnWidth : 0,
isFitWidth: true
});
},
function() {
$container.show();
$('#loader').hide();
});
However, I notice that when .show() is called, Masonry hasn't been applied to the content. I know in this question, the creator of Masonry suggested that there isn't good support for Masonry callbacks right now. Has anyone come up with a decent workaround?
Thanks!