Freemasonry adds the “masonry” css class to the container after it finishes setting up the bricks. Just add css rules to hide the DIV.
For example, if you have
<div id="container"> <div id="loading">Loading...</div> [items to use in the masonry layout] <div class="box">1</div> <div class="box">2</div> </div>
then in CSS use
#container.masonry #loading {display: none}
and have rules that make box
's es invisible until the plugin finishes
#container .box {position: absolute; top: -1000px; left: -1000px}
masonry gives box
'es styles to position: absolute
, top
and left
anyway. You will of course need to adapt this to your site.
This should make the div with the "loading" id disappear after the masonry is completed by checking the boxes.
source share