0

Hello, This is my first tumblr theme attemt and this is what i have got so far, the masonry is working on the main page, but when the infinite scroll jquery plugin loads the second page the sorting acts funny, here are the urls →

Live Url : http://rmlthemer1.tumblr.com
Complete Code : http://snippi.com/s/zn2evle

This is my first theme attempt and the only issue i am not able to resolve myself is the masonry positioning on infinite scrolling. i would really appreciate if someone could help me out here.

Thanks in advance.

Edited by spyece

2
Contributors
2
Replies
5
Views
5 Years
Discussion Span
Last Post by lambing
0

you should trigger the plugin masonry again to resort the page. you can specify a callback function for infinite scroll

e.g.

    $('element').infiniteScroll({}, function(newElements) {
      // newElements are the set of elements fetched after ajax call
      // you may retrigger masonry to resort the new set of elements added.
      var $newElements = $(newElements);
      $newElements.imagesLoaded(function() {
        $newElements.masonry('appended', $newElements, true);
      });
    });

I hope this helps.

Edited by lambing

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.