M
M
Maxim Chernykh2020-06-26 15:08:00
JavaScript
Maxim Chernykh, 2020-06-26 15:08:00

How to build isotope grid after ajax?

Display elements using pdoPage

<div id="pdopage">
        
            <div class="portfolio-masonry rows" >

                <div class="grid-sizer"></div>
                
                [[!pdoPage?
                    &parents=`2`
                    &depth=`2`
                    &tpl=`WorksTpl`
                    &where=`{"template":25}`
                    &includeTVs=`img,category,video,work_head,work_desc,video_url,open`
                    &limit=`10`
                    &sortby=`menuindex`
                    &sortdir=`ASC`
                    &ajaxMode=`button`
                ]]
                
            </div>
            
            [[!+page.nav]]
            
        </div>


5ef5e48140ce1983942353.png

After ajax

5ef5e49d77ed4561442041.png

I tried to solve the problem in this way, it did not work out, any ideas how to fix it?

$(document).on('pdopage_load', function(e, config, response) {
            $('.portfolio-masonry').isotope('layout');
});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question