We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,466 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

How can i make infinite scroll and masonry sorting work together on tumblr?

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.

2
Contributors
2
Replies
3 Days
Discussion Span
10 Months Ago
Last Updated
3
Views
spyece
Newbie Poster
11 posts since Dec 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Anyone? Please .. :)

spyece
Newbie Poster
11 posts since Dec 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 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.

lambing
Junior Poster in Training
76 posts since Feb 2010
Reputation Points: 10
Solved Threads: 15
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0607 seconds using 2.69MB