December 21, 2015
jQuery Masonry
So I recently added Masonry to a Bootstrap 3 page, to organize some divs that are within a section with content above and below. Worked great… except the content below was floated overlapping the new laid-out elements from above.
The hack’ish “Fix”… use a setTimeout:
var masonryOptions_projects = { columnWidth: ".project", itemSelector: ".project" }; jQuery("#projects").masonry(masonryOptions_projects); setTimeout(function({ jQuery("#projects").masonry(masonryOptions_projects); }, 500);