I am using infinite ajax scroll on my page and I added magnific popup ajax view it's working fine with first page but when I am scrolling to second page it's not working ... how can I solve it ? thanks for answers,,,
here infinite ajax scroll;
$(document).ready(function() {
var container = document.querySelector('.post-list');
var msnry = new Masonry(container, {
columnWidth: '.grid-sizer',
itemSelector: '.box',
percentPosition: true,
visibleStyle: {
transform: 'translateY(0)',
opacity: 1
},
hiddenStyle: {
transform: 'translateY(100px)',
opacity: 0
},
});
var ias = $.ias({
container: ".container",
item: ".box",
pagination: ".page-links-list",
next: ".page-next",
delay: 0,
negativeMargin: 200
});
ias.on('render', function(items) {
$(items).css({
opacity: 0
});
});
ias.on('rendered', function(items) {
msnry.appended(items);
});
});
and here magnific popup code;
$('.ajax-popup-link').magnificPopup({
type: 'ajax',
callbacks: {
parseAjax: function(mfpResponse) {
mfpResponse.data = $(mfpResponse.data).find('.entry-content, .post-video');
console.log('Ajax content loaded:', mfpResponse);
}
}
});
question from:
https://stackoverflow.com/questions/65889268/magnefic-popup-stops-working-when-scrolling 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…