jquery, masonry after append complete
问题 I have the jQuery below http://jsfiddle.net/XMdYw/7/ var elements = ''; var ELEMENT_COUNT_PER_PAGE = 301; var page = 1; for (var i = (ELEMENT_COUNT_PER_PAGE * (page - 1)); i <= (ELEMENT_COUNT_PER_PAGE * page); i++) { elements+= '<div class="imgwrap"><img src="lq/'+i+'.jpg" class="image-'+i+'"/></div>' } $('.imagecontainer').append(elements).masonry(); The issue with it is that the images are overlapping, after refreshing the page it fixes but once the site is completely realoded it has the