W
W
WebforSelf2021-03-25 01:07:58
AJAX
WebforSelf, 2021-03-25 01:07:58

Does masonry with ajax work incorrectly?

I use this plugin to load posts in the form of a masonry tile

https://masonry.desandro.com/

//masorny
var $container = $('#masonry');
// Инициализация
$container.masonry({
  itemSelector: '.item'
//});


Actually, at first there were problems with images when loading, it was decided by the additional plugin

imagesloaded.pkgd.min.js

//masorny
        $('#masonry').imagesLoaded(function () {
            $('#masonry').masonry({
                itemSelector: '.item'
            });
            ;
        });


Actually the problem is gone, but by installing the plugin
WP Ajax Load More Pagination

When loading the following pages, the common #masonry block is not updated.
In the plugin, it is intended that you can put your own js when working with Ajax.

605bb7775c71b500189127.png

But here's how to update masonry with Ajax pagination, something doesn't work.
https://masonry.desandro.com/faq.html
I found it here, but I don’t understand how to update with Ajax pagination.

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