Pergamino Ajax infinito con isótopo

Having trouble getting Infinite Ajax Scroll plugin working on a Ghost Blog theme. I'm also using Isotope plugin for my layout.

Upon monitoring the development cmd, I see that GET requests are being made upon scrolling. They usually send back a 200, though sometimes 304.

I've a hunch that the problem's related to my callback for Isotope, though I haven't been able to get infinite scroll to work in any way (disabling Isotope, all other plugins, etc).

Aquí está el código:

  var ias = $.ias({
    container:  $container,
    item:       '.post-excerpt-block-wrap',
    pagination: '.pagination-inner',
    next:       '.older-posts'
  });
  
  $.ias().extension(new IASPagingExtension());
  
  ias.on('rendered', function(items) {
      loadImages();
      checkForFeatured();
      makeFontResponsive();
      addReadMoreLinks();
      fitVidInit();
      var $newElems = $(items); 
      $newElems.imagesLoaded(function(){
        $container.isotope( 'appended', $newElems );
      });
      
  });

The currently callback to Isotope is causing the initially rendered content to jump down on page scroll, but no additional elements are added to the page.

Grateful for help/insight.

Actualizar

Upon reading issue threads in the github repo I realized that the problem could be related to the version of jQuery Ghost uses by default - 1.11.0 So I tried using the latest (2.1.1), but no change.

Also, to better explain the current behavior: Only 304 GET responses are being returned and it's possible to just keep scrolling. When doing this, the pages in the console are shown to loop, specifically, here's what's shown in the console:

GET /page/2/  304  47ms
GET /page/3/  304  55ms
GET /page/4/  304  49ms
GET / 304  61ms
GET /page/2/  304  41ms
etc...

The code (theme) is now live for debugging AQUÍ

preguntado el 28 de mayo de 14 a las 14:05

1 Respuestas

Desde https://github.com/webcreate/infinite-ajax-scroll/issues/141:

One thing I noticed tho is how you configured the container selector:

var ias = $.ias({
  container:  $container,
  ...
});

You should pass in a string with the selector for the container, so not $container but ".post-excerpt". Hope this helps.

Respondido el 05 de junio de 14 a las 09:06

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.