javascript - The masonry bricks are stacked together until page resize on Wordpress -
i found few questions on stackoverflow didn't resolve problem, i'm trying asking here.
when load page masonry bricks stacked in top/left of window. when resize page arrange in correct position. i'm using javascript in page of wordpress. code @ bottom of page:
<script src="http://www.bitumephotofest.it/wordpress/wp-content/themes/sequential/js/masonry.pkgd.min.js"></script> <script> var container = document.queryselector('#container'); var msnry = new masonry( container, { // options columnwidth: 10, itemselector: '.item' }); </script>
i undestrood previous questions on stackoverflow have use "imagesloaded()". , how should add it? i'm novice in javascript.
any suggests?
it's difficult know without example url try:
<script> $(document).ready(function() { var container = document.queryselector('#container'); var msnry = new masonry( container, { // options columnwidth: 10, itemselector: '.item' }); }); </script>
Comments
Post a Comment