How to add new object in masonry grid

1 reply · opened Feb 1, 2020

DdjaycodeFeb 1, 2020

hello this is my code

    `const article = document.createElement('article');
    article.className = 'portfolio-item pf-media pf-icons';
    article.setAttribute("style", "position: absolute; left: 0px; top: 0px;");
    article.innerHTML = `
        <div class="portfolio-image">
        [
        
        ](portfolio-single.html)
        <div class="portfolio-overlay">
        <div class="portfolio-desc" style="margin-top: 63px;">
        <h3>[Open Imagination](portfolio-single.html)</h3>
        <span>[Media](#), [Icons](#)</span>
        </div>
        <a href="`+imgUrl+`" class="left-icon" data-lightbox="image"><i class="icon-line-plus"></i>
        [](portfolio-single.html)
        </div>
        </div>`;
    document.getElementById('portfolio').appendChild(article);`

it does add the objects but its not showing.. does not refresh

SSemicolon WebSTAFFFeb 4, 2020

Hello,

Please make sure that you use the recommended codes from the Official Isotope Documentation: https://isotope.metafizzy.co/methods.html#adding-and-removing-items to add your Images to the Masonry Grid without causing causing issues.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard