dimsemenov / Magnific-Popup

Light and responsive lightbox script with focus on performance.
http://dimsemenov.com/plugins/magnific-popup/
MIT License
11.39k stars 3.48k forks source link

magnific popup ajax stopped when scrolling #1107

Open aydcery opened 5 years ago

aydcery commented 5 years ago

hi, I am using infinite ajax scroll on my page and I added magnific popup ajax view it's wroking fine with first page but when I am scrolling to page it's not working ... how can I solve it ? thanks for answers,,,

here infinite ajax scroll;

$(document).ready(function() {
    var ias = $.ias({
      container:  "#switchview",
      item:       "article.post",
      pagination: ".posts-navigation",
      next:       ".nav-previous a"
    });

    var inumber = mainscript.infinitenumber;

    ias.extension(new IASSpinnerExtension({
      html: '<div class="switch-loader"><span class="loader"></span></div>'      // override text when no pages left
    }));            // shows a spinner (a.k.a. loader)
    ias.extension(new IASTriggerExtension({offset: inumber})); // shows a trigger after page 3
    ias.extension(new IASNoneLeftExtension({
      html: '<div class="load-nomore"><span>There are no more pages left to load.</span></div>'      // override text when no pages left
    }));
  });

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);
            }
        }

});