Having an issue with macy.js on my website. The masonry element doesn't work on IE11 initially, but when I toggle the "inspect element" feature on and off, it starts working suddenly. Is there a way to trigger it automatically right after the website loads?
html:
<div class="col-10">
<div class="portfolio-component__images js-portfolio-component__images w-100 text-right">
<a href="/"><img class="portfolio-component__images--image" src="images/portfolio_1.png" alt="altTex"/></a>
<a href="/"><img class="portfolio-component__images--image" src="images/portfolio_2.png" alt="altTex"/></a>
<a href="/"><img class="portfolio-component__images--image" src="images/portfolio_4.png" alt="altTex"/></a>
<a href="/"><img class="portfolio-component__images--image" src="images/portfolio_3.png" alt="altTex"/></a>
</div>
</div>
js:
const Masonry = new Macy({
container: '.js-portfolio-component__images',
columns: 2,
margin: {
x: 24,
y: 24
}
})