var $container = $('#news-stack'); $(document).ready( function () { $container.imagesLoaded( function(){ //$('#news-loading').hide(); $container.masonry({ itemSelector : '.news-stack-item' }); }); $('link[title=news_listing]').prop('disabled',true); });